Bug 1294542 - Enable the block-spacing rule for eslint. r=felipe
☠☠ backed out by 4b48ad68a594 ☠ ☠
authorJared Wein <jwein@mozilla.com>
Tue, 16 Aug 2016 15:44:13 -0400
changeset 353345 7914e9dc6f8820fdb347de0491b6170a8e45080f
parent 353344 049fe094cf32ba6afc256bf413e14f9360faca69
child 353346 fb19d42ce694da7033b24837a6711225de1e494a
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1294542
milestone51.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 1294542 - Enable the block-spacing rule for eslint. r=felipe MozReview-Commit-ID: AAXqh63QNv3
browser/base/content/abouthealthreport/abouthealth.js
browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
browser/components/preferences/in-content/tests/browser_bug705422.js
browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
toolkit/.eslintrc
toolkit/components/aboutperformance/content/aboutPerformance.js
toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js
toolkit/components/contentprefs/nsContentPrefService.js
toolkit/components/ctypes/tests/unit/test_jsctypes.js
toolkit/components/passwordmgr/content/passwordManagerExceptions.js
toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
toolkit/components/places/tests/history/test_insert.js
toolkit/components/places/tests/unit/test_history_sidebar.js
toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
toolkit/components/printing/content/printPreviewProgress.js
toolkit/components/printing/content/printProgress.js
toolkit/components/viewconfig/content/config.js
toolkit/components/viewsource/content/viewSourceUtils.js
toolkit/content/aboutSupport.js
toolkit/crashreporter/CrashSubmit.jsm
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/modules/tests/xpcshell/test_Log.js
toolkit/modules/tests/xpcshell/test_Promise.js
toolkit/mozapps/extensions/DeferredSave.jsm
toolkit/mozapps/extensions/amWebAPI.js
toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -145,17 +145,17 @@ var healthReportWrapper = {
         Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
   initRemotePage: function () {
     let iframe = document.getElementById("remote-report").contentDocument;
     iframe.addEventListener("RemoteHealthReportCommand",
-                            function onCommand(e) {healthReportWrapper.handleRemoteCommand(e);},
+                            function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); },
                             false);
     healthReportWrapper.updatePrefState();
   },
 
   // error handling
   ERROR_INIT_FAILED:    1,
   ERROR_PAYLOAD_FAILED: 2,
   ERROR_PREFS_FAILED:   3,
--- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
+++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
@@ -67,17 +67,17 @@ function synthesizeDragWithDirection(aEl
     aElement.removeEventListener("click", prevent, false);
 
     // Cleanup eventually opened menus.
     if (aElement.localName == "menu" && aElement.open)
       aElement.open = false;
     aCallback()
   }, false);
 
-  var prevent = function(aEvent) {aEvent.preventDefault();}
+  var prevent = function(aEvent) { aEvent.preventDefault(); }
 
   var xIncrement = 0;
   var yIncrement = 0;
 
   switch (aDirection) {
     case dragDirections.LEFT:
       xIncrement = -1;
       break;
--- a/browser/components/preferences/in-content/tests/browser_bug705422.js
+++ b/browser/components/preferences/in-content/tests/browser_bug705422.js
@@ -41,17 +41,21 @@ function initTest() {
         cookieSvc.setCookieString(cookieUri, null, name+"="+value+";", null);
     }
 
     // open cookie manager
     var cmd = window.openDialog("chrome://browser/content/preferences/cookies.xul",
                                 "Browser:Cookies", "", {});
 
     // when it has loaded, run actual tests
-    cmd.addEventListener("load", function() {executeSoon(function() {runTest(cmd, searchTerm, vals.length, matches);});}, false);
+    cmd.addEventListener("load", function() {
+        executeSoon(function() {
+            runTest(cmd, searchTerm, vals.length, matches);
+        });
+    }, false);
 }
 
 function isDisabled(win, expectation) {
     var disabled = win.document.getElementById("removeAllCookies").disabled;
     is(disabled, expectation, "Remove all cookies button has correct state: "+(expectation?"disabled":"enabled"));
 }
 
 function runTest(win, searchTerm, cookies, matches) {
--- a/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
+++ b/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js
@@ -86,18 +86,18 @@ add_task(function* testSyncedTabsSidebar
   let SyncedTabs = SidebarUI.browser.contentWindow.SyncedTabs;
 
   Assert.ok(syncedTabsDeckComponent, "component exists");
 
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: true,
     hasSyncedThisSession: true,
-    getTabClients() { return Promise.resolve([])},
-    syncTabs() {return Promise.resolve();},
+    getTabClients() { return Promise.resolve([]) },
+    syncTabs() { return Promise.resolve(); },
   };
 
   sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(true));
   sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve(Cu.cloneInto(FIXTURE, {})));
 
   yield syncedTabsDeckComponent.updatePanel();
   // This is a hacky way of waiting for the view to render. The view renders
   // after the following promise (a different instance of which is triggered
@@ -139,18 +139,18 @@ add_task(function* testSyncedTabsSidebar
   let SyncedTabs = window.SidebarUI.browser.contentWindow.SyncedTabs;
 
   Assert.ok(syncedTabsDeckComponent, "component exists");
 
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: true,
     hasSyncedThisSession: true,
-    getTabClients() { return Promise.resolve([])},
-    syncTabs() {return Promise.resolve();},
+    getTabClients() { return Promise.resolve([]) },
+    syncTabs() { return Promise.resolve(); },
   };
 
   sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(true));
   sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve(Cu.cloneInto(FIXTURE, {})));
 
   yield syncedTabsDeckComponent.updatePanel();
   // This is a hacky way of waiting for the view to render. The view renders
   // after the following promise (a different instance of which is triggered
@@ -199,17 +199,17 @@ add_task(function* testSyncedTabsSidebar
   let syncedTabsDeckComponent = window.SidebarUI.browser.contentWindow.syncedTabsDeckComponent;
   let SyncedTabs = window.SidebarUI.browser.contentWindow.SyncedTabs;
 
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: false,
     hasSyncedThisSession: false,
     getTabClients() {},
-    syncTabs() {return Promise.resolve();},
+    syncTabs() { return Promise.resolve(); },
   };
 
   Assert.ok(syncedTabsDeckComponent, "component exists");
 
   sinon.spy(syncedTabsDeckComponent, "updatePanel");
   sinon.spy(syncedTabsDeckComponent, "observe");
 
   sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.reject("Test error"));
@@ -261,18 +261,18 @@ add_task(function* testSyncedTabsSidebar
   let SyncedTabs = window.SidebarUI.browser.contentWindow.SyncedTabs;
 
   Assert.ok(syncedTabsDeckComponent, "component exists");
 
   originalSyncedTabsInternal = SyncedTabs._internal;
   SyncedTabs._internal = {
     isConfiguredToSyncTabs: true,
     hasSyncedThisSession: true,
-    getTabClients() { return Promise.resolve([])},
-    syncTabs() {return Promise.resolve();},
+    getTabClients() { return Promise.resolve([]) },
+    syncTabs() { return Promise.resolve(); },
   };
 
   sinon.stub(syncedTabsDeckComponent, "_accountStatus", ()=> Promise.resolve(true));
   sinon.stub(SyncedTabs._internal, "getTabClients", ()=> Promise.resolve(Cu.cloneInto(FIXTURE, {})));
 
   yield syncedTabsDeckComponent.updatePanel();
   // This is a hacky way of waiting for the view to render. The view renders
   // after the following promise (a different instance of which is triggered
--- a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
+++ b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
@@ -1433,17 +1433,17 @@ add_task(function* test_DirectoryLinksPr
   // exhaust daily views
   DirectoryLinksProvider._addFrequencyCapView("1")
   do_check_true(DirectoryLinksProvider._testFrequencyCapLimits("1"));
   DirectoryLinksProvider._addFrequencyCapView("1")
   do_check_false(DirectoryLinksProvider._testFrequencyCapLimits("1"));
 
   // now step into the furture
   let _wasTodayOrig = DirectoryLinksProvider._wasToday;
-  DirectoryLinksProvider._wasToday = function () {return false;}
+  DirectoryLinksProvider._wasToday = function () { return false; }
   // exhaust total views
   DirectoryLinksProvider._addFrequencyCapView("1")
   do_check_true(DirectoryLinksProvider._testFrequencyCapLimits("1"));
   DirectoryLinksProvider._addFrequencyCapView("1")
   // reached totalViews 4, should return false
   do_check_false(DirectoryLinksProvider._testFrequencyCapLimits("1"));
 
   // add more views by updating configuration
@@ -1482,17 +1482,17 @@ add_task(function* test_DirectoryLinksPr
 
   do_check_true(DirectoryLinksProvider._testFrequencyCapLimits("bar.com"));
   // report site action
   yield DirectoryLinksProvider.reportSitesAction([{
     link: {
       targetedSite: "foo.com",
       url: "bar.com"
     },
-    isPinned: function() {return false;},
+    isPinned: function() { return false; },
   }], "view", 0);
 
   // read file content and ensure that view counters are updated
   let data = yield readJsonFile(DirectoryLinksProvider._frequencyCapFilePath);
   do_check_eq(data["bar.com"].dailyViews, 1);
   do_check_eq(data["bar.com"].totalViews, 1);
 
   yield promiseCleanDirectoryLinksProvider();
@@ -1526,19 +1526,19 @@ add_task(function* test_DirectoryLinksPr
         uri: NetUtil.newURI(landingUrl),
         title: "HELLO",
         visits: [{
           visitDate: Date.now()*1000,
           transitionType: Ci.nsINavHistoryService.TRANSITION_LINK
         }]
       },
       {
-        handleError: function () {do_check_true(false);},
+        handleError: function () { do_check_true(false); },
         handleResult: function () {},
-        handleCompletion: function () {resolve();}
+        handleCompletion: function () { resolve(); }
       }
     );
   });
 
   function UrlDeletionTester() {
     this.promise = new Promise(resolve => {
       this.onDeleteURI = (directoryLinksProvider, link) => {
         resolve();
@@ -1823,17 +1823,17 @@ add_task(function* test_blockSuggestedTi
   });
 
   // ensure that tile is suggested
   let suggestedLink = DirectoryLinksProvider._updateSuggestedTile();
   do_check_true(suggestedLink.frecent_sites);
 
   // block suggested tile in a regular way
   DirectoryLinksProvider.reportSitesAction([{
-      isPinned: function() {return false;},
+      isPinned: function() { return false; },
       link: Object.assign({frecency: 1000},suggestedLink)
   }], "block", 0);
 
   // suggested tile still must be recommended
   suggestedLink = DirectoryLinksProvider._updateSuggestedTile();
   do_check_true(suggestedLink.frecent_sites);
 
   // timestamp suggested_block in the frequency cap object
--- a/toolkit/.eslintrc
+++ b/toolkit/.eslintrc
@@ -4,17 +4,17 @@
   "rules": {
     // Braces only needed for multi-line arrow function blocks
     // "arrow-body-style": [2, "as-needed"],
 
     // Require spacing around =>
     // "arrow-spacing": 2,
 
     // Always require spacing around a single line block
-    // "block-spacing": 1,
+    "block-spacing": 2,
 
     // No newline before open brace for a block
     // "brace-style": 2,
 
     // No space before always a space after a comma
     // "comma-spacing": [2, {"before": false, "after": true}],
 
     // Commas at the end of the line not the start
--- a/toolkit/components/aboutperformance/content/aboutPerformance.js
+++ b/toolkit/components/aboutperformance/content/aboutPerformance.js
@@ -125,17 +125,17 @@ let tabFinder = {
  * In mochi tests, it's possible for this to be called after the
  * about:performance window has been torn down, which causes `setTimeout` to
  * throw an NS_ERROR_NOT_INITIALIZED exception. In that case, returning
  * `undefined` is fine.
  */
 function wait(ms = 0) {
   try {
     let resolve;
-    let p = new Promise(resolve_ => {resolve = resolve_});
+    let p = new Promise(resolve_ => { resolve = resolve_ });
     setTimeout(resolve, ms);
     return p;
   } catch (e) {
     dump("WARNING: wait aborted because of an invalid Window state in aboutPerformance.js.\n");
     return undefined;
   }
 }
 
--- a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js
+++ b/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js
@@ -35,17 +35,17 @@ function test_portal_not_found() {
     prepare: function prepare() {
       do_check_eq(++step, 1);
       gCaptivePortalDetector.finishPreparation(kInterfaceName);
     },
     complete: function complete(success) {
       do_check_eq(++step, 2);
       do_check_true(success);
       do_check_eq(attempt, 1);
-      gServer.stop(function() {dump('server stop\n'); do_test_finished(); });
+      gServer.stop(function() { dump('server stop\n'); do_test_finished(); });
     }
   };
 
   gCaptivePortalDetector.checkCaptivePortal(kInterfaceName, callback);
 }
 
 function run_test() {
   run_captivedetect_test(xhr_handler, fakeUIResponse, test_portal_not_found);
--- a/toolkit/components/contentprefs/nsContentPrefService.js
+++ b/toolkit/components/contentprefs/nsContentPrefService.js
@@ -223,17 +223,17 @@ ContentPrefService.prototype = {
                                  Cr.NS_ERROR_ILLEGAL_VALUE);
 
     var group = this._parseGroupParam(aGroup);
 
     if (aContext && aContext.usePrivateBrowsing) {
       if (this._privModeStorage.has(group, aName)) {
         let value = this._privModeStorage.get(group, aName);
         if (aCallback) {
-          this._scheduleCallback(function() {aCallback.onResult(value);});
+          this._scheduleCallback(function() { aCallback.onResult(value); });
           return undefined;
         }
         return value;
       }
       // if we don't have a pref specific to this private mode browsing
       // session, to try to get one from normal mode
     }
 
@@ -592,17 +592,17 @@ ContentPrefService.prototype = {
     tm.mainThread.dispatch(func, Ci.nsIThread.DISPATCH_NORMAL);
   },
 
   _selectPref: function ContentPrefService__selectPref(aGroup, aSetting, aCallback) {
     let value = undefined;
     if (this._cache.has(aGroup, aSetting)) {
       value = this._cache.get(aGroup, aSetting);
       if (aCallback) {
-        this._scheduleCallback(function() {aCallback.onResult(value);});
+        this._scheduleCallback(function() { aCallback.onResult(value); });
         return undefined;
       }
       return value;
     }
 
     try {
       this._stmtSelectPref.params.group = aGroup;
       this._stmtSelectPref.params.setting = aSetting;
@@ -642,17 +642,17 @@ ContentPrefService.prototype = {
     return this.__stmtSelectGlobalPref;
   },
 
   _selectGlobalPref: function ContentPrefService__selectGlobalPref(aName, aCallback) {
     let value = undefined;
     if (this._cache.has(null, aName)) {
       value = this._cache.get(null, aName);
       if (aCallback) {
-        this._scheduleCallback(function() {aCallback.onResult(value);});
+        this._scheduleCallback(function() { aCallback.onResult(value); });
         return undefined;
       }
       return value;
     }
 
     try {
       this._stmtSelectGlobalPref.params.name = aName;
 
--- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js
+++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js
@@ -2647,17 +2647,17 @@ function run_single_closure_tests(librar
   var fn_v_t = ctypes.FunctionType(ctypes.default_abi, ctypes.void_t, []).ptr;
   fn_v_t(function() {})(); // Don't crash
 
   // Code evaluated in a sandbox uses (and pushes) a separate JSContext.
   // Make sure that we don't run into an assertion caused by a cx stack
   // mismatch with the cx stashed in the closure.
   try {
     var sb = Components.utils.Sandbox("http://www.example.com");
-    sb.fn = fn_v_t(function() {sb.foo = {};});
+    sb.fn = fn_v_t(function() { sb.foo = {}; });
     Components.utils.evalInSandbox("fn();", sb);
   } catch (e) {} // Components not available in workers.
 
   // Make sure that a void callback can't return an error sentinel.
   var sentinelThrew = false;
   try {
   fn_v_t(function() {}, null, -1);
   } catch (e) {
--- a/toolkit/components/passwordmgr/content/passwordManagerExceptions.js
+++ b/toolkit/components/passwordmgr/content/passwordManagerExceptions.js
@@ -21,19 +21,19 @@ var rejectsTreeView = {
   getCellValue : function(row, column) {},
   getCellText : function(row, column) {
     var rv="";
     if (column.id=="rejectCol") {
       rv = rejects[row].host;
     }
     return rv;
   },
-  isSeparator : function(index) {return false;},
+  isSeparator : function(index) { return false; },
   isSorted: function() { return false; },
-  isContainer : function(index) {return false;},
+  isContainer : function(index) { return false; },
   cycleHeader : function(column) {},
   getRowProperties : function(row) { return ""; },
   getColumnProperties : function(column) { return ""; },
   getCellProperties : function(row, column) {
     if (column.element.getAttribute("id") == "rejectCol")
       return "ltr";
 
     return "";
--- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
+++ b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js
@@ -38,21 +38,21 @@ function burnCPU() {
  * Spend some time in CPOW.
  */
 function burnCPOW() {
   gBurnCPOW();
 }
 let gBurnCPOW = null;
 
 function burnContentCPU() {
-  setTimeout(() => {try {
+  setTimeout(() => { try {
     gBurnContentCPU()
   } catch (ex) {
     dump(`test-addon error: ${ex}\n`);
-  }}, 0);
+  } }, 0);
 }
 let gBurnContentCPU = null;
 
 let gTab = null;
 let gTabBrowser = null;
 
 function startup() {
   Services.obs.addObserver(burnCPU, TOPIC_BURNCPU, false);
--- a/toolkit/components/places/tests/history/test_insert.js
+++ b/toolkit/components/places/tests/history/test_insert.js
@@ -179,17 +179,17 @@ add_task(function* test_insert_multiple_
     () =>  PlacesUtils.history.insertMany([validPageInfo, {}]),
     /TypeError: PageInfo object must have a url property/,
     "passing a second invalid PageInfo object to History.insertMany should throw a TypeError"
   );
 });
 
 add_task(function* test_history_insertMany() {
   const BAD_URLS = ["about:config", "chrome://browser/content/browser.xul"];
-  const GOOD_URLS = [1, 2, 3].map(x => {return `http://mozilla.com/${x}`;});
+  const GOOD_URLS = [1, 2, 3].map(x => { return `http://mozilla.com/${x}`; });
 
   let makePageInfos = Task.async(function*(urls, filter = x => x) {
     let pageInfos = [];
     for (let url of urls) {
       let uri = NetUtil.newURI(url);
 
       let pageInfo = {
         title: `Visit to ${url}`,
--- a/toolkit/components/places/tests/unit/test_history_sidebar.js
+++ b/toolkit/components/places/tests/unit/test_history_sidebar.js
@@ -69,17 +69,17 @@ var containers = [
   { label: ""                    , offset: -days_for_x_months_ago(nowObj, 1) , visible: true },
   { label: ""                    , offset: -days_for_x_months_ago(nowObj, 2) , visible: true },
   { label: ""                    , offset: -days_for_x_months_ago(nowObj, 3) , visible: true },
   { label: ""                    , offset: -days_for_x_months_ago(nowObj, 4) , visible: true },
   { label: "Older than 6 months" , offset: -days_for_x_months_ago(nowObj, 5) , visible: true },
 ];
 
 var visibleContainers = containers.filter(
-  function(aContainer) {return aContainer.visible});
+  function(aContainer) { return aContainer.visible });
 
 /**
  * Asynchronous task that fills history and checks containers' labels.
  */
 function* task_fill_history() {
   print("\n\n*** TEST Fill History\n");
   // We can't use "now" because our hardcoded offsets would be invalid for some
   // date.  So we hardcode a date.
--- a/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
+++ b/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js
@@ -437,17 +437,17 @@ add_task(function* test_getLivemark_id_s
   do_check_eq(livemark.index, bookmark.index);
 });
 
 add_task(function* test_getLivemark_removeItem_contention() {
   // do not yield.
   PlacesUtils.livemarks.addLivemark({ title: "test"
                                     , parentGuid: PlacesUtils.bookmarks.unfiledGuid
                                     , feedURI: FEED_URI
-                                  }).catch(() => {/* swallow errors*/});
+                                  }).catch(() => { /* swallow errors*/ });
   yield PlacesUtils.bookmarks.eraseEverything();
   let livemark = yield PlacesUtils.livemarks.addLivemark(
     { title: "test"
     , parentGuid: PlacesUtils.bookmarks.unfiledGuid
     , feedURI: FEED_URI
     });
 
   livemark = yield PlacesUtils.livemarks.getLivemark({ guid: livemark.guid });
--- a/toolkit/components/printing/content/printPreviewProgress.js
+++ b/toolkit/components/printing/content/printPreviewProgress.js
@@ -137,17 +137,17 @@ function getString (stringId) {
 
 // If the user presses cancel, tell the app launcher and close the dialog...
 function onCancel ()
 {
   // Cancel app launcher.
   try {
     printProgress.processCanceledByUser = true;
   }
-  catch (e) {return true;}
+  catch (e) { return true; }
 
   // don't Close up dialog by returning false, the backend will close the dialog when everything will be aborted.
   return false;
 }
 
 function doneIniting()
 {
   // called by function timeout in onLoad
--- a/toolkit/components/printing/content/printProgress.js
+++ b/toolkit/components/printing/content/printProgress.js
@@ -239,17 +239,17 @@ function onLoad() {
       progressLabel = "Preparing..."; // better than nothing
     }
     dialog.tempLabel.value = progressLabel;
 
     dialog.title.value = docTitle;
 
     // Set up dialog button callbacks.
     var object = this;
-    doSetOKCancel("", function () { return object.onCancel();});
+    doSetOKCancel("", function () { return object.onCancel(); });
 
     // Fill dialog.
     loadDialog();
 
     // set our web progress listener on the helper app launcher
     printProgress.registerListener(progressListener);
     moveToAlertPosition();
     //We need to delay the set title else dom will overwrite it
@@ -273,17 +273,17 @@ function onUnload()
 // If the user presses cancel, tell the app launcher and close the dialog...
 function onCancel ()
 {
   // Cancel app launcher.
    try
    {
      printProgress.processCanceledByUser = true;
    }
-   catch ( exception ) {return true;}
+   catch ( exception ) { return true; }
 
   // don't Close up dialog by returning false, the backend will close the dialog when everything will be aborted.
   return false;
 }
 
 function doneIniting()
 {
   printProgress.doneIniting();
--- a/toolkit/components/viewconfig/content/config.js
+++ b/toolkit/components/viewconfig/content/config.js
@@ -105,24 +105,24 @@ var view = {
     this.treebox.invalidate();
     if (index >= 0) {
       this.selection.select(index);
       this.treebox.ensureRowIsVisible(index);
     }
   },
   selectionChanged : function() {},
   cycleCell: function(row, col) {},
-  isEditable: function(row, col) {return false; },
-  isSelectable: function(row, col) {return false; },
+  isEditable: function(row, col) { return false; },
+  isSelectable: function(row, col) { return false; },
   setCellValue: function(row, col, value) {},
   setCellText: function(row, col, value) {},
   performAction: function(action) {},
   performActionOnRow: function(action, row) {},
   performActionOnCell: function(action, row, col) {},
-  isSeparator: function(index) {return false; }
+  isSeparator: function(index) { return false; }
 };
 
 // find the index in gPrefView of a pref object
 // or -1 if it does not exist in the filtered view
 function getViewIndexOfPref(pref)
 {
   var low = -1, high = gPrefView.length;
   var index = (low + high) >> 1;
--- a/toolkit/components/viewsource/content/viewSourceUtils.js
+++ b/toolkit/components/viewsource/content/viewSourceUtils.js
@@ -486,20 +486,20 @@ var gViewSourceUtils = {
         // we failed loading it with the external editor.
         Components.utils.reportError(ex);
         gViewSourceUtils.handleCallBack(this.callBack, false, this.data);
       } finally {
         this.destroy();
       }
     },
 
-    onLocationChange: function() {return 0;},
-    onProgressChange: function() {return 0;},
-    onStatusChange: function() {return 0;},
-    onSecurityChange: function() {return 0;},
+    onLocationChange: function() { return 0; },
+    onProgressChange: function() { return 0; },
+    onStatusChange: function() { return 0; },
+    onSecurityChange: function() { return 0; },
 
     webShell: null,
     editor: null,
     callBack: null,
     data: null,
     file: null
   },
 
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -297,19 +297,20 @@ var snapshotFormatters = {
       // (see Troubleshoot.jsm) but we check anyway:
       if ("indices" in data && data.failures.length == data.indices.length) {
         let combined = [];
         for (let i = 0; i < data.failures.length; i++) {
           let assembled = assembleFromGraphicsFailure(i, data);
           combined.push(assembled);
         }
         combined.sort(function(a,b) {
-            if (a.index < b.index) return -1;
-            if (a.index > b.index) return 1;
-            return 0;});
+          if (a.index < b.index) return -1;
+          if (a.index > b.index) return 1;
+          return 0;
+        });
         $.append($("graphics-failures-tbody"),
                  combined.map(function(val) {
                    return $.new("tr", [$.new("th", val.header, "column"),
                                        $.new("td", val.message)]);
                  }));
         delete data.indices;
       } else {
         $.append($("graphics-failures-tbody"),
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -487,17 +487,17 @@ this.CrashSubmit = {
    * @param id
    *        Filename (minus .dmp extension) of the report to ignore
    */
 
   ignore: function CrashSubmit_ignore(id) {
     let [dump, extra, mem] = getPendingMinidump(id);
     return OS.File.open(dump.path + ".ignore", {create: true},
                         {unixFlags: OS.Constants.libc.O_CREAT})
-      .then((file) => {file.close(); });
+      .then((file) => { file.close(); });
   },
 
   /**
    * Get the list of pending crash IDs.
    *
    * @return an array of string, each being an ID as
    *         expected to be passed to submit()
    */
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -13,17 +13,18 @@ Cu.import("resource://gre/modules/Promis
 Cu.import("resource://gre/modules/Preferences.jsm")
 Cu.import("resource://gre/modules/UpdateUtils.jsm");
 
 var { computeHash } = Cu.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
 var ProductAddonCheckerScope = Cu.import("resource://gre/modules/addons/ProductAddonChecker.jsm");
 
 do_get_profile();
 
-function run_test() {Cu.import("resource://gre/modules/Preferences.jsm")
+function run_test() {
+  Cu.import("resource://gre/modules/Preferences.jsm");
   Preferences.set("media.gmp.log.dump", true);
   Preferences.set("media.gmp.log.level", 0);
   run_next_test();
 }
 
 /**
  * Tests that the helper used for preferences works correctly
  */
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -366,33 +366,33 @@ add_task(function* log_message_with_para
               'Missing object is ${missing}');
 
   // Make sure we don't treat the parameter name 'false' as a falsey value.
   do_check_eq(formatMessage("False is ${false}", {false: true}),
               'False is true');
 
   // If an object has a .toJSON method, the formatter uses it.
   let ob = function() {};
-  ob.toJSON = function() {return {sneaky: "value"}};
+  ob.toJSON = function() { return {sneaky: "value"} };
   do_check_eq(formatMessage("JSON is ${sub}", {sub: ob}),
               'JSON is {"sneaky":"value"}');
 
   // Fall back to .toSource() if JSON.stringify() fails on an object.
   ob = function() {};
-  ob.toJSON = function() {throw "oh noes JSON"};
+  ob.toJSON = function() { throw "oh noes JSON" };
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
               'Fail is (function () {})');
 
   // Fall back to .toString if both .toJSON and .toSource fail.
-  ob.toSource = function() {throw "oh noes SOURCE"};
+  ob.toSource = function() { throw "oh noes SOURCE" };
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
               'Fail is function () {}');
 
   // Fall back to '[object]' if .toJSON, .toSource and .toString fail.
-  ob.toString = function() {throw "oh noes STRING"};
+  ob.toString = function() { throw "oh noes STRING" };
   do_check_eq(formatMessage("Fail is ${sub}", {sub: ob}),
               'Fail is [object]');
 
   // If params are passed but there are no substitution in the text
   // we JSON format and append the entire parameters object.
   do_check_eq(formatMessage("Text with no subs", {a: "b", c: "d"}),
               'Text with no subs: {"a":"b","c":"d"}');
 
@@ -441,17 +441,17 @@ add_task(function* log_message_with_para
   str = formatMessage(null, err);
   do_check_true(str.startsWith('[Exception... "test exception"'));
   // If the text is null and 'params' is a String object, the message is exactly that string.
   str = formatMessage(null, new String("String in place of params"));
   do_check_eq(str, "String in place of params");
 
   // We use object.valueOf() internally; make sure a broken valueOf() method
   // doesn't cause the logger to fail.
-  let vOf = {a: 1, valueOf: function() {throw "oh noes valueOf"}};
+  let vOf = {a: 1, valueOf: function() { throw "oh noes valueOf" }};
   do_check_eq(formatMessage("Broken valueOf ${}", vOf),
               'Broken valueOf ({a:1, valueOf:(function () {throw "oh noes valueOf"})})');
 
   // Test edge cases of bad data to formatter:
   // If 'params' is not an object, format it as a basic type.
   do_check_eq(formatMessage("non-object no subst", 1),
               'non-object no subst: 1');
   do_check_eq(formatMessage("non-object all subst ${}", 2),
--- a/toolkit/modules/tests/xpcshell/test_Promise.js
+++ b/toolkit/modules/tests/xpcshell/test_Promise.js
@@ -943,17 +943,17 @@ tests.push(
 
     do_print("Setting wait for first promise");
     promise1.then(value => {
       do_print("Starting event loop");
       event_loop();
     }, null);
 
     do_print("Setting wait for second promise");
-    return promise2.catch(error => {return 3;})
+    return promise2.catch(error => { return 3; })
     .then(
       count => {
         shouldExitNestedEventLoop = true;
       });
   }));
 
 function wait_for_uncaught(aMustAppear, aTimeout = undefined) {
   let remaining = new Set();
@@ -1069,17 +1069,17 @@ function wait_for_uncaught(aMustAppear, 
 
 // Test that caught errors are not reported as uncaught
 tests.push(
 make_promise_test(function test_caught_is_not_reported() {
   let salt = (Math.random() * ( Math.pow(2, 24) - 1 ));
   let promise = wait_for_uncaught([salt], 500);
   (function() {
     let uncaught = Promise.reject("This error, on the other hand, is caught " + salt);
-    uncaught.catch(function() { /* ignore rejection */});
+    uncaught.catch(function() { /* ignore rejection */ });
     uncaught = null;
   })();
   // Isolate this in a function to increase likelihood that the gc will
   // realise that |uncaught| has remained uncaught.
   Components.utils.forceGC();
 
   return promise.then(function onSuccess() {
     throw new Error("This error was caught and should not have been reported");
--- a/toolkit/mozapps/extensions/DeferredSave.jsm
+++ b/toolkit/mozapps/extensions/DeferredSave.jsm
@@ -212,17 +212,17 @@ this.DeferredSave.prototype = {
         this.logger.error("Deferred save dataProvider failed", e);
       writing.then(null, error => {})
         .then(count => {
           pending.reject(e);
         });
       return;
     }
 
-    writing.then(null, error => {return 0;})
+    writing.then(null, error => { return 0; })
     .then(count => {
         this.logger.debug("Starting write");
       this.totalSaves++;
       this.writeInProgress = true;
 
       OS.File.writeAtomic(this._path, toSave, {tmpPath: this._path + ".tmp"})
       .then(
         result => {
--- a/toolkit/mozapps/extensions/amWebAPI.js
+++ b/toolkit/mozapps/extensions/amWebAPI.js
@@ -163,17 +163,17 @@ function WebAPITask(apiRequest, apiArgs,
         reject(new win.Error("Unexpected internal error"));
       });
     });
   }
 }
 
 Addon.prototype = {
   uninstall: WebAPITask("addonUninstall", function() { return [this.id]; }),
-  setEnabled: WebAPITask("addonSetEnabled", function(value) {return [this.id, value]; }),
+  setEnabled: WebAPITask("addonSetEnabled", function(value) { return [this.id, value]; }),
 };
 
 const INSTALL_EVENTS = [
   "onDownloadStarted",
   "onDownloadProgress",
   "onDownloadEnded",
   "onDownloadCancelled",
   "onDownloadFailed",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
@@ -387,17 +387,17 @@ function check_test_pt1() {
   dump("Checking pt 1\n");
 
   AddonManager.getAddonsByIDs(ADDONS.map(a => a.id), function(addons) {
     for (var i = 0; i < ADDONS.length; i++) {
       if (!addons[i])
         do_throw("Addon " + (i + 1) + " did not get installed correctly");
     }
 
-    do_execute_soon(function checkstate1() {check_state("start", null, run_test_pt2);});
+    do_execute_soon(function checkstate1() { check_state("start", null, run_test_pt2); });
   });
 }
 
 /**
  * Load the toolkit based blocks
  */
 function run_test_pt2() {
   dump("Running test pt 2\n");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js
@@ -178,17 +178,17 @@ function check_test_1() {
           do_check_false(a1.hasResource("foo.bar"));
 
           let uri = do_get_addon_root_uri(profileDir, "addon1@tests.mozilla.org");
           do_check_eq(a1.getResourceURI("install.rdf").spec, uri + "install.rdf");
           do_check_eq(a1.iconURL, uri + "icon.png");
           do_check_eq(a1.icon64URL, uri + "icon64.png");
 
           a1.uninstall();
-          do_execute_soon(function() {run_test_2(a1)});
+          do_execute_soon(function() { run_test_2(a1) });
         });
       });
     }));
   });
 }
 
 // Tests that an install from a url downloads.
 function run_test_2(aAddon) {