From b82aa6f6de8cb3223b7b65747d36006432a897a5 Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Tue, 16 Aug 2016 15:44:13 -0400 Subject: [PATCH] Bug 1294542 - Enable the block-spacing rule for eslint. r=felipe MozReview-Commit-ID: AAXqh63QNv3 --- .../base/content/abouthealthreport/abouthealth.js | 2 +- .../browser/browser_drag_bookmarks_on_toolbar.js | 2 +- .../in-content/tests/browser_bug705422.js | 6 +++++- .../test/browser/browser_sidebar_syncedtabslist.js | 14 +++++++------- .../test/xpcshell/test_DirectoryLinksProvider.js | 10 +++++----- toolkit/.eslintrc | 2 +- .../aboutperformance/content/aboutPerformance.js | 2 +- .../test/unit/test_captive_portal_not_found.js | 2 +- .../contentprefs/nsContentPrefService.js | 6 +++--- .../components/ctypes/tests/unit/test_jsctypes.js | 2 +- .../content/passwordManagerExceptions.js | 4 ++-- .../browser/browser_Addons_sample/bootstrap.js | 4 ++-- .../components/places/tests/history/test_insert.js | 2 +- .../places/tests/unit/test_history_sidebar.js | 2 +- .../places/tests/unit/test_mozIAsyncLivemarks.js | 2 +- .../printing/content/printPreviewProgress.js | 2 +- .../components/printing/content/printProgress.js | 4 ++-- toolkit/components/viewconfig/content/config.js | 6 +++--- .../viewsource/content/viewSourceUtils.js | 8 ++++---- toolkit/content/aboutSupport.js | 7 ++++--- toolkit/crashreporter/CrashSubmit.jsm | 2 +- .../tests/xpcshell/test_GMPInstallManager.js | 3 ++- toolkit/modules/tests/xpcshell/test_Log.js | 10 +++++----- toolkit/modules/tests/xpcshell/test_Promise.js | 4 ++-- toolkit/mozapps/extensions/DeferredSave.jsm | 2 +- toolkit/mozapps/extensions/amWebAPI.js | 2 +- .../extensions/test/xpcshell/test_bug449027.js | 2 +- .../test/xpcshell/test_install_strictcompat.js | 2 +- 28 files changed, 61 insertions(+), 55 deletions(-) diff --git a/browser/base/content/abouthealthreport/abouthealth.js b/browser/base/content/abouthealthreport/abouthealth.js index 4c4c6bbdd13e..66cbe16f5eb7 100644 --- a/browser/base/content/abouthealthreport/abouthealth.js +++ b/browser/base/content/abouthealthreport/abouthealth.js @@ -150,7 +150,7 @@ var healthReportWrapper = { 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(); }, diff --git a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js index d80f92910d21..465f88dd4462 100644 --- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js +++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js @@ -72,7 +72,7 @@ function synthesizeDragWithDirection(aElement, aExpectedDragData, aDirection, aC aCallback() }, false); - var prevent = function(aEvent) {aEvent.preventDefault();} + var prevent = function(aEvent) { aEvent.preventDefault(); } var xIncrement = 0; var yIncrement = 0; diff --git a/browser/components/preferences/in-content/tests/browser_bug705422.js b/browser/components/preferences/in-content/tests/browser_bug705422.js index 63c23f8ce4fb..3b6a3218d427 100644 --- a/browser/components/preferences/in-content/tests/browser_bug705422.js +++ b/browser/components/preferences/in-content/tests/browser_bug705422.js @@ -46,7 +46,11 @@ function initTest() { "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) { diff --git a/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js b/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js index 3f68dfc296ad..cfe74415cc71 100644 --- a/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js +++ b/browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js @@ -91,8 +91,8 @@ add_task(function* testSyncedTabsSidebarList() { 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)); @@ -144,8 +144,8 @@ add_task(function* testSyncedTabsSidebarFilteredList() { 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)); @@ -204,7 +204,7 @@ add_task(function* testSyncedTabsSidebarStatus() { isConfiguredToSyncTabs: false, hasSyncedThisSession: false, getTabClients() {}, - syncTabs() {return Promise.resolve();}, + syncTabs() { return Promise.resolve(); }, }; Assert.ok(syncedTabsDeckComponent, "component exists"); @@ -266,8 +266,8 @@ add_task(function* testSyncedTabsSidebarContextMenu() { 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)); diff --git a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js index d6ed3ee2d738..d07a10541c6a 100644 --- a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js +++ b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js @@ -1438,7 +1438,7 @@ add_task(function* test_DirectoryLinksProvider_getFrequencyCapLogic() { // 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")); @@ -1487,7 +1487,7 @@ add_task(function* test_DirectoryLinksProvider_getFrequencyCapReportSiteAction() 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 @@ -1531,9 +1531,9 @@ add_task(function* test_DirectoryLinksProvider_ClickRemoval() { }] }, { - handleError: function () {do_check_true(false);}, + handleError: function () { do_check_true(false); }, handleResult: function () {}, - handleCompletion: function () {resolve();} + handleCompletion: function () { resolve(); } } ); }); @@ -1828,7 +1828,7 @@ add_task(function* test_blockSuggestedTiles() { // 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); diff --git a/toolkit/.eslintrc b/toolkit/.eslintrc index 12857900cf09..123f7dc59201 100644 --- a/toolkit/.eslintrc +++ b/toolkit/.eslintrc @@ -9,7 +9,7 @@ // "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, diff --git a/toolkit/components/aboutperformance/content/aboutPerformance.js b/toolkit/components/aboutperformance/content/aboutPerformance.js index ebca66a57a35..0693af318b11 100644 --- a/toolkit/components/aboutperformance/content/aboutPerformance.js +++ b/toolkit/components/aboutperformance/content/aboutPerformance.js @@ -130,7 +130,7 @@ let tabFinder = { 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) { diff --git a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js b/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js index 740bb83017de..1dc4fe0092fc 100644 --- a/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js +++ b/toolkit/components/captivedetect/test/unit/test_captive_portal_not_found.js @@ -40,7 +40,7 @@ function test_portal_not_found() { 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(); }); } }; diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js index dad19846c569..e70bdcee6ea3 100644 --- a/toolkit/components/contentprefs/nsContentPrefService.js +++ b/toolkit/components/contentprefs/nsContentPrefService.js @@ -228,7 +228,7 @@ ContentPrefService.prototype = { 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; @@ -597,7 +597,7 @@ ContentPrefService.prototype = { 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; @@ -647,7 +647,7 @@ ContentPrefService.prototype = { 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; diff --git a/toolkit/components/ctypes/tests/unit/test_jsctypes.js b/toolkit/components/ctypes/tests/unit/test_jsctypes.js index b3761ad31664..6ca90dd44fec 100644 --- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js +++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js @@ -2652,7 +2652,7 @@ function run_single_closure_tests(library, abi, suffix) // 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. diff --git a/toolkit/components/passwordmgr/content/passwordManagerExceptions.js b/toolkit/components/passwordmgr/content/passwordManagerExceptions.js index dff07e60445f..da66c63ef242 100644 --- a/toolkit/components/passwordmgr/content/passwordManagerExceptions.js +++ b/toolkit/components/passwordmgr/content/passwordManagerExceptions.js @@ -26,9 +26,9 @@ var rejectsTreeView = { } 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 ""; }, diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js index 44bc050921c5..9a557582794d 100644 --- a/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js +++ b/toolkit/components/perfmonitoring/tests/browser/browser_Addons_sample/bootstrap.js @@ -43,11 +43,11 @@ function burnCPOW() { let gBurnCPOW = null; function burnContentCPU() { - setTimeout(() => {try { + setTimeout(() => { try { gBurnContentCPU() } catch (ex) { dump(`test-addon error: ${ex}\n`); - }}, 0); + } }, 0); } let gBurnContentCPU = null; diff --git a/toolkit/components/places/tests/history/test_insert.js b/toolkit/components/places/tests/history/test_insert.js index 185a6489c8ba..d7006292724f 100644 --- a/toolkit/components/places/tests/history/test_insert.js +++ b/toolkit/components/places/tests/history/test_insert.js @@ -184,7 +184,7 @@ add_task(function* test_insert_multiple_error_cases() { 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 = []; diff --git a/toolkit/components/places/tests/unit/test_history_sidebar.js b/toolkit/components/places/tests/unit/test_history_sidebar.js index 63aa9af99238..b78f618eaec8 100644 --- a/toolkit/components/places/tests/unit/test_history_sidebar.js +++ b/toolkit/components/places/tests/unit/test_history_sidebar.js @@ -74,7 +74,7 @@ var containers = [ ]; var visibleContainers = containers.filter( - function(aContainer) {return aContainer.visible}); + function(aContainer) { return aContainer.visible }); /** * Asynchronous task that fills history and checks containers' labels. diff --git a/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js b/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js index 4df791c1d8d0..5136591ba474 100644 --- a/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js +++ b/toolkit/components/places/tests/unit/test_mozIAsyncLivemarks.js @@ -442,7 +442,7 @@ add_task(function* test_getLivemark_removeItem_contention() { 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" diff --git a/toolkit/components/printing/content/printPreviewProgress.js b/toolkit/components/printing/content/printPreviewProgress.js index 44a1ebc57e75..00d43c4ad43f 100644 --- a/toolkit/components/printing/content/printPreviewProgress.js +++ b/toolkit/components/printing/content/printPreviewProgress.js @@ -142,7 +142,7 @@ function onCancel () 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; diff --git a/toolkit/components/printing/content/printProgress.js b/toolkit/components/printing/content/printProgress.js index fd8263975001..f0a09a98ab59 100644 --- a/toolkit/components/printing/content/printProgress.js +++ b/toolkit/components/printing/content/printProgress.js @@ -244,7 +244,7 @@ function onLoad() { // Set up dialog button callbacks. var object = this; - doSetOKCancel("", function () { return object.onCancel();}); + doSetOKCancel("", function () { return object.onCancel(); }); // Fill dialog. loadDialog(); @@ -278,7 +278,7 @@ function onCancel () { 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; diff --git a/toolkit/components/viewconfig/content/config.js b/toolkit/components/viewconfig/content/config.js index acc8fe1d7568..562962894ea7 100644 --- a/toolkit/components/viewconfig/content/config.js +++ b/toolkit/components/viewconfig/content/config.js @@ -110,14 +110,14 @@ var view = { }, 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 diff --git a/toolkit/components/viewsource/content/viewSourceUtils.js b/toolkit/components/viewsource/content/viewSourceUtils.js index d297c7396f82..8e7cf3112ce6 100644 --- a/toolkit/components/viewsource/content/viewSourceUtils.js +++ b/toolkit/components/viewsource/content/viewSourceUtils.js @@ -491,10 +491,10 @@ var gViewSourceUtils = { } }, - 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, diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index a24266e81fd8..5b805ae71030 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -302,9 +302,10 @@ var snapshotFormatters = { 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"), diff --git a/toolkit/crashreporter/CrashSubmit.jsm b/toolkit/crashreporter/CrashSubmit.jsm index c9d696603ea0..2cf14d0cd29f 100644 --- a/toolkit/crashreporter/CrashSubmit.jsm +++ b/toolkit/crashreporter/CrashSubmit.jsm @@ -492,7 +492,7 @@ this.CrashSubmit = { 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(); }); }, /** diff --git a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js index 984c53c4248a..b9dcdc3b9615 100644 --- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js +++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js @@ -18,7 +18,8 @@ var ProductAddonCheckerScope = Cu.import("resource://gre/modules/addons/ProductA 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(); diff --git a/toolkit/modules/tests/xpcshell/test_Log.js b/toolkit/modules/tests/xpcshell/test_Log.js index 94b66270bdc3..b1dcc532e8b6 100644 --- a/toolkit/modules/tests/xpcshell/test_Log.js +++ b/toolkit/modules/tests/xpcshell/test_Log.js @@ -371,23 +371,23 @@ add_task(function* log_message_with_params() { // 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]'); @@ -446,7 +446,7 @@ add_task(function* log_message_with_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"})})'); diff --git a/toolkit/modules/tests/xpcshell/test_Promise.js b/toolkit/modules/tests/xpcshell/test_Promise.js index 08c70d234af7..d8e3d4446675 100644 --- a/toolkit/modules/tests/xpcshell/test_Promise.js +++ b/toolkit/modules/tests/xpcshell/test_Promise.js @@ -948,7 +948,7 @@ tests.push( }, null); do_print("Setting wait for second promise"); - return promise2.catch(error => {return 3;}) + return promise2.catch(error => { return 3; }) .then( count => { shouldExitNestedEventLoop = true; @@ -1074,7 +1074,7 @@ make_promise_test(function test_caught_is_not_reported() { 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 diff --git a/toolkit/mozapps/extensions/DeferredSave.jsm b/toolkit/mozapps/extensions/DeferredSave.jsm index 15e208b9017b..2f4084054423 100644 --- a/toolkit/mozapps/extensions/DeferredSave.jsm +++ b/toolkit/mozapps/extensions/DeferredSave.jsm @@ -217,7 +217,7 @@ this.DeferredSave.prototype = { return; } - writing.then(null, error => {return 0;}) + writing.then(null, error => { return 0; }) .then(count => { this.logger.debug("Starting write"); this.totalSaves++; diff --git a/toolkit/mozapps/extensions/amWebAPI.js b/toolkit/mozapps/extensions/amWebAPI.js index 5c60772b46d2..1c14e5cc6e88 100644 --- a/toolkit/mozapps/extensions/amWebAPI.js +++ b/toolkit/mozapps/extensions/amWebAPI.js @@ -168,7 +168,7 @@ function WebAPITask(apiRequest, apiArgs, processor) { 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 = [ diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js b/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js index 5968505c17af..1512a7f9283b 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js @@ -392,7 +392,7 @@ function check_test_pt1() { 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); }); }); } diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js b/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js index 229adc84855f..dbbfeefcd407 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_install_strictcompat.js @@ -183,7 +183,7 @@ function check_test_1() { 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) }); }); }); }));