Bug 1275363 - Fix ext-notifications.js, line 59: TypeError: this is undefined, r?kmag draft
authorBob Silverberg <bsilverberg@mozilla.com>
Tue, 24 May 2016 16:26:41 -0400
changeset 370478 dadfbd2a91b0beb8cfed0a0109b3a4ecf5b709e3
parent 370367 bf3b012748a42d2af8406064c3466706c7d9f0c8
child 521760 8911ce8cd841b448293e3d875459a9f52d92dd80
push id19072
push userbmo:bob.silverberg@gmail.com
push dateTue, 24 May 2016 20:39:09 +0000
reviewerskmag
bugs1275363
milestone49.0a1
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");