Bug 1207490 - Part 15: Remove use of expression closure from browser/modules/WindowsPreviewPerTab.jsm. r=Gijs
authorTooru Fujisawa <arai_a@mac.com>
Wed, 23 Sep 2015 17:58:18 +0900
changeset 265257 97264d043924aa5605f271178fca371078468ba0
parent 265256 e2c4a65fe7900c6b80be0f7ffe89fe4fb809b2cd
child 265258 b06d2002c03bb58cf649dbd00c13cbe610038783
push id65891
push userarai_a@mac.com
push dateWed, 30 Sep 2015 16:36:04 +0000
treeherdermozilla-inbound@10194aec7255 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1207490
milestone44.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 1207490 - Part 15: Remove use of expression closure from browser/modules/WindowsPreviewPerTab.jsm. r=Gijs
browser/modules/WindowsPreviewPerTab.jsm
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -310,18 +310,17 @@ PreviewController.prototype = {
     // Avoid returning 0
     let tabWidth = boxObject.width || 1;
     // Avoid divide by 0
     let tabHeight = boxObject.height || 1;
     return tabWidth / tabHeight;
   },
 
   drawPreview: function (ctx) {
-    let self = this;
-    this.win.tabbrowser.previewTab(this.tab, function () self.previewTabCallback(ctx));
+    this.win.tabbrowser.previewTab(this.tab, () => this.previewTabCallback(ctx));
 
     // We must avoid having the frame drawn around the window. See bug 520807
     return false;
   },
 
   previewTabCallback: function (ctx) {
     // This will extract the resolution-scale component of the scaling we need,
     // which should be applied to both chrome and content;
@@ -744,17 +743,17 @@ this.AeroPeek = {
           let controller = preview.controller.wrappedJSObject;
           controller.resetCanvasPreview();
         });
         break;
     }
   }
 };
 
-XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", function ()
+XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", () =>
   Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer)
 );
 
 XPCOMUtils.defineLazyServiceGetter(AeroPeek, "prefs",
                                    "@mozilla.org/preferences-service;1",
                                    "nsIPrefBranch");
 
 AeroPeek.initialize();