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 299330 f59918cf04fa5954101b0274ebf60fb7e11e7a21
parent 299329 3db9a42c96afaaa69e23ec61b1de0dc950c4d0c9
child 299331 942a381dd8ee20ffb8dc15860efbebc63d3c4eac
push id30296
push usercbook@mozilla.com
push dateMon, 30 May 2016 09:55:22 +0000
treeherdermozilla-central@cad514ad49c1 [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");