Bug 1138873 - Remove expression closures from handleResult methods. r=dao
authorZach Miller <zmiller12@mail.wou.edu> and Kevin Hutt <khutt12@wou.edu>
Wed, 11 Mar 2015 17:17:16 -0700
changeset 233371 4a28831d14d63e3dde9c2c0fd906f0672cdd00e7
parent 233370 9421390046aace443cff1c4ead36114b5559415c
child 233372 0767aa455e0348976c93914bf62fd8aa1e56feef
push id56829
push userryanvm@gmail.com
push dateThu, 12 Mar 2015 22:35:09 +0000
treeherdermozilla-inbound@42afc7ef5ccb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1138873
milestone39.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 1138873 - Remove expression closures from handleResult methods. r=dao
browser/base/content/browser-fullZoom.js
--- a/browser/base/content/browser-fullZoom.js
+++ b/browser/base/content/browser-fullZoom.js
@@ -157,17 +157,17 @@ var FullZoom = {
 
     // If the current page doesn't have a site-specific preference, then its
     // zoom should be set to the new global preference now that the global
     // preference has changed.
     let hasPref = false;
     let ctxt = this._loadContextFromBrowser(browser);
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(browser.currentURI.spec, this.name, ctxt, {
-      handleResult: function () hasPref = true,
+      handleResult: function () { hasPref = true; },
       handleCompletion: function () {
         if (!hasPref && token.isCurrent)
           this._applyPrefToZoom(undefined, browser);
       }.bind(this)
     });
   },
 
   // location change observer
@@ -226,17 +226,17 @@ var FullZoom = {
                             this._notifyOnLocationChange.bind(this));
       return;
     }
 
     // It's not cached, so we have to asynchronously fetch it.
     let value = undefined;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(aURI.spec, this.name, ctxt, {
-      handleResult: function (resultPref) value = resultPref.value,
+      handleResult: function (resultPref) { value = resultPref.value; },
       handleCompletion: function () {
         if (!token.isCurrent) {
           this._notifyOnLocationChange();
           return;
         }
         this._applyPrefToZoom(value, browser,
                               this._notifyOnLocationChange.bind(this));
       }.bind(this)
@@ -490,17 +490,17 @@ var FullZoom = {
     // * this._globalValue === undefined => global value known not to exist.
     // * Otherwise, this._globalValue is a number, the global value.
     if ("_globalValue" in this) {
       callback.call(this, this._globalValue, true);
       return;
     }
     let value = undefined;
     this._cps2.getGlobal(this.name, this._loadContextFromBrowser(browser), {
-      handleResult: function (pref) value = pref.value,
+      handleResult: function (pref) { value = pref.value; },
       handleCompletion: function (reason) {
         this._globalValue = this._ensureValid(value);
         callback.call(this, this._globalValue);
       }.bind(this)
     });
   },
 
   /**