Bug 1275363 - Fix ext-notifications.js, line 59: TypeError: this is undefined, r=kmag
authorBob Silverberg <bsilverberg@mozilla.com>
Sun, 29 May 2016 17:23:57 -0700
changeset 338320 f59918cf04fa5954101b0274ebf60fb7e11e7a21
parent 338319 3db9a42c96afaaa69e23ec61b1de0dc950c4d0c9
child 338321 942a381dd8ee20ffb8dc15860efbebc63d3c4eac
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag
bugs1275363
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1275363 - Fix ext-notifications.js, line 59: TypeError: this is undefined, r=kmag MozReview-Commit-ID: j6G1dXvoXQ
toolkit/components/extensions/ext-notifications.js
--- a/toolkit/components/extensions/ext-notifications.js
+++ b/toolkit/components/extensions/ext-notifications.js
@@ -49,20 +49,20 @@ Notification.prototype = {
       // This will fail if the OS doesn't support this function.
     }
     notificationsMap.get(this.extension).delete(this.id);
   },
 
   observe(subject, topic, data) {
     let notifications = notificationsMap.get(this.extension);
 
-    function emitAndDelete(event) {
+    let emitAndDelete = event => {
       notifications.emit(event, data);
       notifications.delete(this.id);
-    }
+    };
 
     // Don't try to emit events if the extension has been unloaded
     if (!notifications) {
       return;
     }
 
     if (topic === "alertclickcallback") {
       emitAndDelete("clicked");