Bug 1325464 - Manually fix the remaining ES6 method syntax eslint errors. r=MattN
☠☠ backed out by 6fb777f48fa6 ☠ ☠
authorJared Wein <jwein@mozilla.com>
Wed, 28 Dec 2016 12:22:09 -0500
changeset 355569 562ddc32cc21743e6e2ecb7a4eccf5353999b00c
parent 355568 cd10db6087ddd3a8e872c0de6ef35a886250173e
child 355570 976a2704406a62f42f837292f8f6e38bee4f486b
push id10621
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 16:02:43 +0000
treeherdermozilla-aurora@dca7b42e6c67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1325464
milestone53.0a1
Bug 1325464 - Manually fix the remaining ES6 method syntax eslint errors. r=MattN MozReview-Commit-ID: 6NqMryvKH9S
browser/base/content/tabbrowser.xml
browser/base/content/urlbarBindings.xml
browser/components/customizableui/content/toolbar.xml
browser/components/newtab/tests/browser/newtabwebchannel_basic.html
browser/components/search/content/search.xml
toolkit/components/alerts/test/test_alerts.html
toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
toolkit/components/passwordmgr/test/test_master_password.html
toolkit/components/passwordmgr/test/test_prompt_async.html
toolkit/components/printing/content/printPreviewBindings.xml
toolkit/components/satchel/test/test_form_autocomplete.html
toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html
toolkit/content/widgets/autocomplete.xml
toolkit/content/widgets/editor.xml
toolkit/content/widgets/findbar.xml
toolkit/content/widgets/preferences.xml
toolkit/content/widgets/richlistbox.xml
toolkit/content/widgets/toolbar.xml
toolkit/mozapps/extensions/content/setting.xml
toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -561,67 +561,67 @@
             mStateFlags: stateFlags,
             mStatus: 0,
             mMessage: "",
             mTotalProgress: 0,
 
             // count of open requests (should always be 0 or 1)
             mRequestCount: 0,
 
-            destroy: function() {
+            destroy() {
               delete this.mTab;
               delete this.mBrowser;
               delete this.mTabBrowser;
             },
 
-            _callProgressListeners: function() {
+            _callProgressListeners() {
               Array.unshift(arguments, this.mBrowser);
               return this.mTabBrowser._callProgressListeners.apply(this.mTabBrowser, arguments);
             },
 
-            _shouldShowProgress: function(aRequest) {
+            _shouldShowProgress(aRequest) {
               if (this.mBlank)
                 return false;
 
               // Don't show progress indicators in tabs for about: URIs
               // pointing to local resources.
               if ((aRequest instanceof Ci.nsIChannel) &&
                   aRequest.originalURI.schemeIs("about") &&
                   (aRequest.URI.schemeIs("jar") || aRequest.URI.schemeIs("file")))
                 return false;
 
               return true;
             },
 
-            onProgressChange: function(aWebProgress, aRequest,
-                                       aCurSelfProgress, aMaxSelfProgress,
-                                       aCurTotalProgress, aMaxTotalProgress) {
+            onProgressChange(aWebProgress, aRequest,
+                             aCurSelfProgress, aMaxSelfProgress,
+                             aCurTotalProgress, aMaxTotalProgress) {
               this.mTotalProgress = aMaxTotalProgress ? aCurTotalProgress / aMaxTotalProgress : 0;
 
               if (!this._shouldShowProgress(aRequest))
                 return;
 
               if (this.mTotalProgress)
                 this.mTab.setAttribute("progress", "true");
 
               this._callProgressListeners("onProgressChange",
                                           [aWebProgress, aRequest,
                                            aCurSelfProgress, aMaxSelfProgress,
                                            aCurTotalProgress, aMaxTotalProgress]);
             },
 
-            onProgressChange64: function(aWebProgress, aRequest,
-                                         aCurSelfProgress, aMaxSelfProgress,
-                                         aCurTotalProgress, aMaxTotalProgress) {
+            onProgressChange64(aWebProgress, aRequest,
+                               aCurSelfProgress, aMaxSelfProgress,
+                               aCurTotalProgress, aMaxTotalProgress) {
               return this.onProgressChange(aWebProgress, aRequest,
                 aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress,
                 aMaxTotalProgress);
             },
 
-            onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+            onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
               if (!aRequest)
                 return;
 
               var oldBlank = this.mBlank;
 
               const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
               const nsIChannel = Components.interfaces.nsIChannel;
               let location, originalLocation;
@@ -752,18 +752,18 @@
                 // reset cached temporary values at beginning and end
                 this.mMessage = "";
                 this.mTotalProgress = 0;
               }
               this.mStateFlags = aStateFlags;
               this.mStatus = aStatus;
             },
 
-            onLocationChange: function(aWebProgress, aRequest, aLocation,
-                                       aFlags) {
+            onLocationChange(aWebProgress, aRequest, aLocation,
+                             aFlags) {
               // OnLocationChange is called for both the top-level content
               // and the subframes.
               let topLevel = aWebProgress.isTopLevel;
 
               if (topLevel) {
                 let isSameDocument =
                   !!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT);
                 // We need to clear the typed value
@@ -833,37 +833,37 @@
               }
 
               if (topLevel) {
                 this.mBrowser.lastURI = aLocation;
                 this.mBrowser.lastLocationChange = Date.now();
               }
             },
 
-            onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
+            onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
               if (this.mBlank)
                 return;
 
               this._callProgressListeners("onStatusChange",
                                           [aWebProgress, aRequest, aStatus, aMessage]);
 
               this.mMessage = aMessage;
             },
 
-            onSecurityChange: function(aWebProgress, aRequest, aState) {
+            onSecurityChange(aWebProgress, aRequest, aState) {
               this._callProgressListeners("onSecurityChange",
                                           [aWebProgress, aRequest, aState]);
             },
 
-            onRefreshAttempted: function(aWebProgress, aURI, aDelay, aSameURI) {
+            onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI) {
               return this._callProgressListeners("onRefreshAttempted",
                                                  [aWebProgress, aURI, aDelay, aSameURI]);
             },
 
-            QueryInterface: function(aIID) {
+            QueryInterface(aIID) {
               if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
                   aIID.equals(Components.interfaces.nsIWebProgressListener2) ||
                   aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
                   aIID.equals(Components.interfaces.nsISupports))
                 return this;
               throw Components.results.NS_NOINTERFACE;
             }
           });
@@ -2067,17 +2067,17 @@
                 aTab.permanentKey = browser.permanentKey;
               }
             }
 
             if (!browser) {
               // No preloaded browser found, create one.
               browser = this._createBrowser({permanentKey: aTab.permanentKey,
                                              remoteType,
-                                             uriIsAboutBlank: uriIsAboutBlank,
+                                             uriIsAboutBlank,
                                              userContextId: aParams.userContextId,
                                              relatedBrowser: aParams.relatedBrowser,
                                              opener: aParams.opener,
                                              isPrerendered: aParams.isPrerendered});
             }
 
             let notificationbox = this.getNotificationBox(browser);
             let uniqueId = this._generateUniquePanelID();
@@ -2119,17 +2119,17 @@
             // for non-remote browsers after we have called browser.loadURI().
             if (remoteType == E10SUtils.NOT_REMOTE) {
               this._outerWindowIDBrowserMap.set(browser.outerWindowID, browser);
             }
 
             var evt = new CustomEvent("TabBrowserInserted", { bubbles: true, detail: {} });
             aTab.dispatchEvent(evt);
 
-            return { usingPreloadedContent: usingPreloadedContent };
+            return { usingPreloadedContent };
           ]]>
         </body>
       </method>
 
       <method name="addTab">
         <parameter name="aURI"/>
         <parameter name="aReferrerURI"/>
         <parameter name="aCharset"/>
@@ -3656,48 +3656,48 @@
             STATE_UNLOADING: 3,
 
             // re-entrancy guard:
             _processing: false,
 
             // Wraps nsITimer. Must not use the vanilla setTimeout and
             // clearTimeout, because they will be blocked by nsIPromptService
             // dialogs.
-            setTimer: function(callback, timeout) {
+            setTimer(callback, timeout) {
               let event = {
                 notify: callback
               };
 
               var timer = Cc["@mozilla.org/timer;1"]
                 .createInstance(Components.interfaces.nsITimer);
               timer.initWithCallback(event, timeout, Ci.nsITimer.TYPE_ONE_SHOT);
               return timer;
             },
 
-            clearTimer: function(timer) {
+            clearTimer(timer) {
               timer.cancel();
             },
 
-            getTabState: function(tab) {
+            getTabState(tab) {
               let state = this.tabState.get(tab);
               if (state === undefined) {
                 return this.STATE_UNLOADED;
               }
               return state;
             },
 
             setTabStateNoAction(tab, state) {
               if (state == this.STATE_UNLOADED) {
                 this.tabState.delete(tab);
               } else {
                 this.tabState.set(tab, state);
               }
             },
 
-            setTabState: function(tab, state) {
+            setTabState(tab, state) {
               this.setTabStateNoAction(tab, state);
 
               let browser = tab.linkedBrowser;
               let {tabParent} = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
               if (state == this.STATE_LOADING) {
                 this.assert(!this.minimized);
                 browser.docShellIsActive = true;
                 if (!tabParent) {
@@ -3710,17 +3710,17 @@
                 }
               }
             },
 
             get minimized() {
               return window.windowState == window.STATE_MINIMIZED;
             },
 
-            init: function() {
+            init() {
               this.log("START");
 
               // If we minimized the window before the switcher was activated,
               // we might have set  the preserveLayers flag for the current
               // browser. Let's clear it.
               this.tabbrowser.mCurrentBrowser.preserveLayers(false);
 
               window.addEventListener("MozAfterPaint", this);
@@ -3730,17 +3730,17 @@
               window.addEventListener("sizemodechange", this);
               window.addEventListener("SwapDocShells", this, true);
               window.addEventListener("EndSwapDocShells", this, true);
               if (!this.minimized) {
                 this.setTabState(this.requestedTab, this.STATE_LOADED);
               }
             },
 
-            destroy: function() {
+            destroy() {
               if (this.unloadTimer) {
                 this.clearTimer(this.unloadTimer);
                 this.unloadTimer = null;
               }
               if (this.loadTimer) {
                 this.clearTimer(this.loadTimer);
                 this.loadTimer = null;
               }
@@ -3756,17 +3756,17 @@
               this.tabbrowser._switcher = null;
 
               this.activeSuppressDisplayport.forEach(function(tabParent) {
                 tabParent.suppressDisplayport(false);
               });
               this.activeSuppressDisplayport.clear();
             },
 
-            finish: function() {
+            finish() {
               this.log("FINISH");
 
               this.assert(this.tabbrowser._switcher);
               this.assert(this.tabbrowser._switcher === this);
               this.assert(!this.spinnerTab);
               this.assert(!this.loadTimer);
               this.assert(!this.loadingTab);
               this.assert(this.lastVisibleTab === this.requestedTab);
@@ -3791,17 +3791,17 @@
                 bubbles: true,
                 cancelable: true
               });
               this.tabbrowser.dispatchEvent(event);
             },
 
             // This function is called after all the main state changes to
             // make sure we display the right tab.
-            updateDisplay: function() {
+            updateDisplay() {
               // Figure out which tab we actually want visible right now.
               let showTab = null;
               if (this.getTabState(this.requestedTab) != this.STATE_LOADED &&
                   this.lastVisibleTab && this.loadTimer) {
                 // If we can't show the requestedTab, and lastVisibleTab is
                 // available, show it.
                 showTab = this.lastVisibleTab;
               } else {
@@ -3850,44 +3850,44 @@
                   this.lastVisibleTab._visuallySelected = false;
 
                 this.visibleTab._visuallySelected = true;
               }
 
               this.lastVisibleTab = this.visibleTab;
             },
 
-            assert: function(cond) {
+            assert(cond) {
               if (!cond) {
                 dump("Assertion failure\n" + Error().stack);
 
                 // Don't break a user's browser if an assertion fails.
                 if (this.tabbrowser.AppConstants.DEBUG) {
                   throw new Error("Assertion failure");
                 }
               }
             },
 
             // We've decided to try to load requestedTab.
-            loadRequestedTab: function() {
+            loadRequestedTab() {
               this.assert(!this.loadTimer);
               this.assert(!this.minimized);
 
               // loadingTab can be non-null here if we timed out loading the current tab.
               // In that case we just overwrite it with a different tab; it's had its chance.
               this.loadingTab = this.requestedTab;
               this.log("Loading tab " + this.tinfo(this.loadingTab));
 
               this.loadTimer = this.setTimer(() => this.onLoadTimeout(), this.TAB_SWITCH_TIMEOUT);
               this.setTabState(this.requestedTab, this.STATE_LOADING);
             },
 
             // This function runs before every event. It fixes up the state
             // to account for closed tabs.
-            preActions: function() {
+            preActions() {
               this.assert(this.tabbrowser._switcher);
               this.assert(this.tabbrowser._switcher === this);
 
               for (let [tab, ] of this.tabState) {
                 if (!tab.linkedBrowser) {
                   this.tabState.delete(tab);
                 }
               }
@@ -3905,17 +3905,17 @@
                 this.loadTimer = null;
               }
             },
 
             // This code runs after we've responded to an event or requested a new
             // tab. It's expected that we've already updated all the principal
             // state variables. This function takes care of updating any auxilliary
             // state.
-            postActions: function() {
+            postActions() {
               // Once we finish loading loadingTab, we null it out. So the state should
               // always be LOADING.
               this.assert(!this.loadingTab ||
                           this.getTabState(this.loadingTab) == this.STATE_LOADING);
 
               // We guarantee that loadingTab is non-null iff loadTimer is non-null. So
               // the timer is set only when we're loading something.
               this.assert(!this.loadTimer || this.loadingTab);
@@ -3957,17 +3957,17 @@
               if (numPending == 0) {
                 this.finish();
               }
 
               this.logState("done");
             },
 
             // Fires when we're ready to unload unused tabs.
-            onUnloadTimeout: function() {
+            onUnloadTimeout() {
               this.logState("onUnloadTimeout");
               this.unloadTimer = null;
               this.preActions();
 
               let numPending = 0;
 
               // Unload any tabs that can be unloaded.
               for (let [tab, state] of this.tabState) {
@@ -3993,26 +3993,26 @@
                 // Keep the timer going since there may be more tabs to unload.
                 this.unloadTimer = this.setTimer(() => this.onUnloadTimeout(), this.UNLOAD_DELAY);
               }
 
               this.postActions();
             },
 
             // Fires when an ongoing load has taken too long.
-            onLoadTimeout: function() {
+            onLoadTimeout() {
               this.logState("onLoadTimeout");
               this.preActions();
               this.loadTimer = null;
               this.loadingTab = null;
               this.postActions();
             },
 
             // Fires when the layers become available for a tab.
-            onLayersReady: function(browser) {
+            onLayersReady(browser) {
               let tab = this.tabbrowser.getTabForBrowser(browser);
               this.logState(`onLayersReady(${tab._tPos})`);
 
               this.assert(this.getTabState(tab) == this.STATE_LOADING ||
                           this.getTabState(tab) == this.STATE_LOADED);
               this.setTabState(tab, this.STATE_LOADED);
 
               this.maybeFinishTabSwitch();
@@ -4022,49 +4022,49 @@
                 this.loadTimer = null;
                 this.loadingTab = null;
               }
             },
 
             // Fires when we paint the screen. Any tab switches we initiated
             // previously are done, so there's no need to keep the old layers
             // around.
-            onPaint: function() {
+            onPaint() {
               this.maybeVisibleTabs.clear();
               this.maybeFinishTabSwitch();
             },
 
             // Called when we're done clearing the layers for a tab.
-            onLayersCleared: function(browser) {
+            onLayersCleared(browser) {
               let tab = this.tabbrowser.getTabForBrowser(browser);
               if (tab) {
                 this.logState(`onLayersCleared(${tab._tPos})`);
                 this.assert(this.getTabState(tab) == this.STATE_UNLOADING ||
                             this.getTabState(tab) == this.STATE_UNLOADED);
                 this.setTabState(tab, this.STATE_UNLOADED);
               }
             },
 
             // Called when a tab switches from remote to non-remote. In this case
             // a MozLayerTreeReady notification that we requested may never fire,
             // so we need to simulate it.
-            onRemotenessChange: function(tab) {
+            onRemotenessChange(tab) {
               this.logState(`onRemotenessChange(${tab._tPos}, ${tab.linkedBrowser.isRemoteBrowser})`);
               if (!tab.linkedBrowser.isRemoteBrowser) {
                 if (this.getTabState(tab) == this.STATE_LOADING) {
                   this.onLayersReady(tab.linkedBrowser);
                 } else if (this.getTabState(tab) == this.STATE_UNLOADING) {
                   this.onLayersCleared(tab.linkedBrowser);
                 }
               }
             },
 
             // Called when a tab has been removed, and the browser node is
             // about to be removed from the DOM.
-            onTabRemoved: function(tab) {
+            onTabRemoved(tab) {
               if (this.lastVisibleTab == tab) {
                 // The browser that was being presented to the user is
                 // going to be removed during this tick of the event loop.
                 // This will cause us to show a tab spinner instead.
                 this.preActions();
                 this.lastVisibleTab = null;
                 this.postActions();
               }
@@ -4147,17 +4147,17 @@
             },
 
             activateBrowserForPrintPreview(browser) {
 	      let tab = this.tabbrowser.getTabForBrowser(browser);
 	      this.setTabState(tab, this.STATE_LOADING);
 	    },
 
             // Called when the user asks to switch to a given tab.
-            requestTab: function(tab) {
+            requestTab(tab) {
               if (tab === this.requestedTab) {
                 return;
               }
 
               this.logState("requestTab " + this.tinfo(tab));
               this.startTabSwitch();
 
               this.requestedTab = tab;
@@ -4174,17 +4174,17 @@
               if (this.unloadTimer) {
                 this.clearTimer(this.unloadTimer);
               }
               this.unloadTimer = this.setTimer(() => this.onUnloadTimeout(), this.UNLOAD_DELAY);
 
               this.postActions();
             },
 
-            handleEvent: function(event, delayed = false) {
+            handleEvent(event, delayed = false) {
               if (this._processing) {
                 this.setTimer(() => this.handleEvent(event, true), 0);
                 return;
               }
               if (delayed && this.tabbrowser._switcher != this) {
                 // if we delayed processing this event, we might be out of date, in which
                 // case we drop the delayed events
                 return;
@@ -4212,110 +4212,110 @@
               this._processing = false;
             },
 
             /*
              * Telemetry and Profiler related helpers for recording tab switch
              * timing.
              */
 
-            startTabSwitch: function() {
+            startTabSwitch() {
               TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
               TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
               this.addMarker("AsyncTabSwitch:Start");
               this.switchInProgress = true;
             },
 
             /**
              * Something has occurred that might mean that we've completed
              * the tab switch (layers are ready, paints are done, spinners
              * are hidden). This checks to make sure all conditions are
              * satisfied, and then records the tab switch as finished.
              */
-            maybeFinishTabSwitch: function() {
+            maybeFinishTabSwitch() {
               if (this.switchInProgress && this.requestedTab &&
                   this.getTabState(this.requestedTab) == this.STATE_LOADED) {
                 // After this point the tab has switched from the content thread's point of view.
                 // The changes will be visible after the next refresh driver tick + composite.
                 let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
                 if (time != -1) {
                   TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
                   this.log("DEBUG: tab switch time = " + time);
                   this.addMarker("AsyncTabSwitch:Finish");
                 }
                 this.switchInProgress = false;
               }
             },
 
-            spinnerDisplayed: function() {
+            spinnerDisplayed() {
               this.assert(!this.spinnerTab);
               TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
               // We have a second, similar probe for capturing recordings of
               // when the spinner is displayed for very long periods.
               TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
               this.addMarker("AsyncTabSwitch:SpinnerShown");
             },
 
-            spinnerHidden: function() {
+            spinnerHidden() {
               this.assert(this.spinnerTab);
               this.log("DEBUG: spinner time = " +
                        TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window));
               TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
               TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
               this.addMarker("AsyncTabSwitch:SpinnerHidden");
               // we do not get a onPaint after displaying the spinner
               this.maybeFinishTabSwitch();
             },
 
-            addMarker: function(marker) {
+            addMarker(marker) {
               if (Services.profiler) {
                 Services.profiler.AddMarker(marker);
               }
             },
 
             /*
              * Debug related logging for switcher.
              */
 
             _useDumpForLogging: false,
             _logInit: false,
 
-            logging: function() {
+            logging() {
               if (this._useDumpForLogging)
                 return true;
               if (this._logInit)
                 return this._shouldLog;
               let result = false;
               try {
                 result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming");
               } catch (ex) {
               }
               this._shouldLog = result;
               this._logInit = true;
               return this._shouldLog;
             },
 
-            tinfo: function(tab) {
+            tinfo(tab) {
               if (tab) {
                 return tab._tPos + "(" + tab.linkedBrowser.currentURI.spec + ")";
               }
               return "null";
             },
 
-            log: function(s) {
+            log(s) {
               if (!this.logging())
                 return;
               if (this._useDumpForLogging) {
                 dump(s + "\n");
               } else {
                 Services.console.logStringMessage(s);
               }
             },
 
-            logState: function(prefix) {
+            logState(prefix) {
               if (!this.logging())
                 return;
 
               let accum = prefix + " ";
               for (let i = 0; i < this.tabbrowser.tabs.length; i++) {
                 let tab = this.tabbrowser.tabs[i];
                 let state = this.getTabState(tab);
 
@@ -4716,23 +4716,23 @@
               if (spellInfo)
                 spellInfo.target = aMessage.target.messageManager;
               let documentURIObject = makeURI(data.docLocation,
                                               data.charSet,
                                               makeURI(data.baseURI));
               gContextMenuContentData = { isRemote: true,
                                           event: aMessage.objects.event,
                                           popupNode: aMessage.objects.popupNode,
-                                          browser: browser,
+                                          browser,
                                           editFlags: data.editFlags,
-                                          spellInfo: spellInfo,
+                                          spellInfo,
                                           principal: data.principal,
                                           customMenuItems: data.customMenuItems,
                                           addonInfo: data.addonInfo,
-                                          documentURIObject: documentURIObject,
+                                          documentURIObject,
                                           docLocation: data.docLocation,
                                           charSet: data.charSet,
                                           referrer: data.referrer,
                                           referrerPolicy: data.referrerPolicy,
                                           contentType: data.contentType,
                                           contentDisposition: data.contentDisposition,
                                           frameOuterWindowID: data.frameOuterWindowID,
                                           selectionInfo: data.selectionInfo,
@@ -5122,24 +5122,24 @@
         -->
       <property name="mStrip" readonly="true">
         <getter>
         <![CDATA[
           return ({
             self: this,
             childNodes: [null, this.tabContextMenu, this.tabContainer],
             firstChild: { nextSibling: this.tabContextMenu },
-            getElementsByAttribute: function(attr, attrValue) {
+            getElementsByAttribute(attr, attrValue) {
               if (attr == "anonid" && attrValue == "tabContextMenu")
                 return [this.self.tabContextMenu];
               return [];
             },
             // Also support adding event listeners (forward to the tab container)
-            addEventListener: function(a, b, c) { this.self.tabContainer.addEventListener(a, b, c); },
-            removeEventListener: function(a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); }
+            addEventListener(a, b, c) { this.self.tabContainer.addEventListener(a, b, c); },
+            removeEventListener(a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); }
           });
         ]]>
         </getter>
       </property>
       <field name="_soundPlayingAttrRemovalTimer">0</field>
     </implementation>
 
     <handlers>
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -820,17 +820,17 @@ file, You can obtain one at http://mozil
 
           return selectedVal;
         ]]></body>
       </method>
 
       <field name="_copyCutController"><![CDATA[
         ({
           urlbar: this,
-          doCommand: function(aCommand) {
+          doCommand(aCommand) {
             var urlbar = this.urlbar;
             var val = urlbar._getSelectedValueForClipboard();
             if (!val)
               return;
 
             if (aCommand == "cmd_cut" && this.isCommandEnabled(aCommand)) {
               let start = urlbar.selectionStart;
               let end = urlbar.selectionEnd;
@@ -844,30 +844,30 @@ file, You can obtain one at http://mozil
 
               SetPageProxyState("invalid");
             }
 
             Cc["@mozilla.org/widget/clipboardhelper;1"]
               .getService(Ci.nsIClipboardHelper)
               .copyString(val);
           },
-          supportsCommand: function(aCommand) {
+          supportsCommand(aCommand) {
             switch (aCommand) {
               case "cmd_copy":
               case "cmd_cut":
                 return true;
             }
             return false;
           },
-          isCommandEnabled: function(aCommand) {
+          isCommandEnabled(aCommand) {
             return this.supportsCommand(aCommand) &&
                    (aCommand != "cmd_cut" || !this.urlbar.readOnly) &&
                    this.urlbar.selectionStart < this.urlbar.selectionEnd;
           },
-          onEvent: function(aEventName) {}
+          onEvent(aEventName) {}
         })
       ]]></field>
 
       <method name="observe">
         <parameter name="aSubject"/>
         <parameter name="aTopic"/>
         <parameter name="aData"/>
         <body><![CDATA[
@@ -1014,17 +1014,17 @@ file, You can obtain one at http://mozil
           if (!MOZ_ACTION_REGEX.test(aUrl))
             return null;
 
           // URL is in the format moz-action:ACTION,PARAMS
           // Where PARAMS is a JSON encoded object.
           let [, type, params] = aUrl.match(MOZ_ACTION_REGEX);
 
           let action = {
-            type: type,
+            type,
           };
 
           action.params = JSON.parse(params);
           for (let key in action.params) {
             action.params[key] = decodeURIComponent(action.params[key]);
           }
 
           if ("url" in action.params) {
@@ -1109,17 +1109,17 @@ file, You can obtain one at http://mozil
 
           // Store the current search string so it can be used in
           // handleCommand, which will be called as a result of
           // mController.handleEnter().
           // Note this is also used to detect if we should perform a delayed
           // handleEnter, in such a case it won't have been cleared.
           this.handleEnterInstance = {
             searchString: this.mController.searchString,
-            event: event
+            event
           };
 
           if (this.popup.selectedIndex != 0 || this.gotResultForCurrentQuery) {
             this.maybeCanonizeURL(event, this.value);
             let rv = this.mController.handleEnter(false, event);
             this.handleEnterInstance = null;
             return rv;
           }
--- a/browser/components/customizableui/content/toolbar.xml
+++ b/browser/components/customizableui/content/toolbar.xml
@@ -288,17 +288,17 @@
       <field name="_contextMenuListener"><![CDATA[({
         toolbar: this,
         contextMenu: null,
 
         get active() {
           return !!this.contextMenu;
         },
 
-        init: function(event) {
+        init(event) {
           let node = event.target;
           while (node != this.toolbar) {
             if (node.localName == "menupopup")
               return;
             node = node.parentNode;
           }
 
           let contextMenuId = this.toolbar.getAttribute("context");
@@ -308,17 +308,17 @@
           this.contextMenu = document.getElementById(contextMenuId);
           if (!this.contextMenu)
             return;
 
           this.contextMenu.addEventListener("popupshown", this, false);
           this.contextMenu.addEventListener("popuphiding", this, false);
           this.toolbar.addEventListener("mousemove", this, false);
         },
-        handleEvent: function(event) {
+        handleEvent(event) {
           switch (event.type) {
             case "popupshown":
               this.toolbar.removeEventListener("mousemove", this, false);
               break;
             case "popuphiding":
             case "mousemove":
               this.toolbar._setInactiveAsync();
               this.toolbar.removeEventListener("mousemove", this, false);
--- a/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
+++ b/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
@@ -20,17 +20,17 @@
                     var detail = {
                         id: "newtab",
                         message: JSON.stringify({type: "reply", data: "quuz"}),
                     };
                     if (e.detail.message.type !== "respond_object") {
                         detail = JSON.stringify(detail);
                     }
                     let reply = new window.CustomEvent("WebChannelMessageToChrome", {
-                        detail: detail
+                        detail
                     });
                     window.dispatchEvent(reply);
                 }
             }, true);
             
         </script>
     </body>
 </html>
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -421,17 +421,17 @@
           var textBox = this._textbox;
 
           // Save the current value in the form history
           if (aData && !PrivateBrowsingUtils.isWindowPrivate(window) && this.FormHistory.enabled) {
             this.FormHistory.update(
               { op : "bump",
                 fieldname : textBox.getAttribute("autocompletesearchparam"),
                 value : aData },
-              { handleError : function(aError) {
+              { handleError(aError) {
                   Components.utils.reportError("Saving search to form history failed: " + aError.message);
               }});
           }
 
           let engine = aEngine || this.currentEngine;
           var submission = engine.getSubmission(aData, null, "searchbar");
           let telemetrySearchDetails = this.telemetrySearchDetails;
           this.telemetrySearchDetails = null;
@@ -494,17 +494,17 @@
         // received focus, ignore the next focus event.
         this._ignoreFocus = (document.activeElement == this._textbox.inputField);
       ]]></handler>
 
       <handler event="focus">
       <![CDATA[
         // Speculatively connect to the current engine's search URI (and
         // suggest URI, if different) to reduce request latency
-        this.currentEngine.speculativeConnect({window: window});
+        this.currentEngine.speculativeConnect({window});
 
         if (this._ignoreFocus) {
           // This window has been re-focused, don't show the suggestions
           this._ignoreFocus = false;
           return;
         }
 
         // Don't open the suggestions if there is no text in the textbox.
@@ -820,26 +820,26 @@
           let numItems = suggestionsHidden ? 0 : this.popup.view.rowCount;
           this.popup.oneOffButtons.handleKeyPress(aEvent, numItems, true);
         ]]></body>
       </method>
 
       <!-- nsIController -->
       <field name="searchbarController" readonly="true"><![CDATA[({
         _self: this,
-        supportsCommand: function(aCommand) {
+        supportsCommand(aCommand) {
           return aCommand == "cmd_clearhistory" ||
                  aCommand == "cmd_togglesuggest";
         },
 
-        isCommandEnabled: function(aCommand) {
+        isCommandEnabled(aCommand) {
           return true;
         },
 
-        doCommand: function(aCommand) {
+        doCommand(aCommand) {
           switch (aCommand) {
             case "cmd_clearhistory":
               var param = this._self.getAttribute("autocompletesearchparam");
 
               BrowserSearch.searchBar.FormHistory.update({ op : "remove", fieldname : param }, null);
               this._self.value = "";
               break;
             case "cmd_togglesuggest":
@@ -2240,17 +2240,17 @@
         let target = event.originalTarget;
         if (target.classList.contains("addengine-item")) {
           // On success, hide the panel and tell event listeners to reshow it to
           // show the new engine.
           let installCallback = {
             onSuccess: engine => {
               this._rebuild();
             },
-            onError: function(errorCode) {
+            onError(errorCode) {
               if (errorCode != Ci.nsISearchInstallCallback.ERROR_DUPLICATE_ENGINE) {
                 // Download error is shown by the search service
                 return;
               }
               const kSearchBundleURI = "chrome://global/locale/search/search.properties";
               let searchBundle = Services.strings.createBundle(kSearchBundleURI);
               let brandBundle = document.getElementById("bundle_brand");
               let brandName = brandBundle.getString("brandShortName");
--- a/toolkit/components/alerts/test/test_alerts.html
+++ b/toolkit/components/alerts/test/test_alerts.html
@@ -16,17 +16,17 @@
 <br>Did a notification appear anywhere?
 <br>If so, the test will finish once the notification disappears.
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 var observer = {
   alertShow: false,
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     is(aData, "foobarcookie", "Checking whether the alert cookie was passed correctly");
     if (aTopic == "alertclickcallback") {
       todo(false, "Did someone click the notification while running mochitests? (Please don't.)");
     } else if (aTopic == "alertshow") {
       ok(!this.alertShow, "Alert should not be shown more than once");
       this.alertShow = true;
     } else {
       is(aTopic, "alertfinished", "Checking the topic for a finished notification");
--- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html
@@ -71,32 +71,32 @@ function initLogins(pi) {
   pwmgr.addLogin(proxyLogin);
 }
 
 var startupCompleteResolver;
 var startupComplete = new Promise(resolve => startupCompleteResolver = resolve);
 
 function proxyChannelListener() { }
 proxyChannelListener.prototype = {
-  onStartRequest: function(request, context) {
+  onStartRequest(request, context) {
     startupCompleteResolver();
   },
-  onStopRequest: function(request, context, status) { }
+  onStopRequest(request, context, status) { }
 };
 
 var resolveCallback = SpecialPowers.wrapCallbackObject({
-  QueryInterface : function(iid) {
+  QueryInterface(iid) {
     const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports];
 
     if (!interfaces.some( function(v) { return iid.equals(v); } ))
       throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
     return this;
   },
 
-  onProxyAvailable : function(req, uri, pi, status) {
+  onProxyAvailable(req, uri, pi, status) {
     initLogins(pi);
 
     // I'm cheating a bit here... We should probably do some magic foo to get
     // something implementing nsIProxiedProtocolHandler and then call
     // NewProxiedChannel(), so we have something that's definately a proxied
     // channel. But Mochitests use a proxy for a number of hosts, so just
     // requesting a normal channel will give us a channel that's proxied.
     // The proxyChannel needs to move to at least on-modify-request to
--- a/toolkit/components/passwordmgr/test/test_master_password.html
+++ b/toolkit/components/passwordmgr/test/test_master_password.html
@@ -123,17 +123,17 @@ function handleDialog(doc, testNumber) {
 
     ok(true, "handleDialog done for test " + testNumber);
 
     if (testNumber == 4)
         checkTest4A();
 }
 
 var outerWindowObserver = {
-  observe: function(id) {
+  observe(id) {
     SpecialPowers.removeObserver(outerWindowObserver, "outer-window-destroyed");
     var func;
     if (testNum == 1)
         func = startTest2;
     else if (testNum == 2)
         func = startTest3;
 
     // For tests 3 and 4C, we use the 'continuation' mechanism, described
--- a/toolkit/components/passwordmgr/test/test_prompt_async.html
+++ b/toolkit/components/passwordmgr/test/test_prompt_async.html
@@ -34,44 +34,44 @@
          *
          * NB: Because the constructor (above) adds |this| directly as an observer,
          * we need to do SpecialPowers.wrapCallbackObject directly on the prototype.
          */
         dialogMonitor.prototype = SpecialPowers.wrapCallbackObject({
             windowsOpen : 0,
             windowsRegistered : 0,
 
-            QueryInterface : function(iid) {
+            QueryInterface(iid) {
                 const interfaces = [Ci.nsIObserver, Ci.nsISupports];
 
                 if (!interfaces.some( function(v) { return iid.equals(v); } ))
                         throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
                 return this;
             },
 
-            observe: function(subject, topic, data) {
+            observe(subject, topic, data) {
                 if (topic === "domwindowopened") {
                     this.windowsOpen++;
                     this.windowsRegistered++;
                     return;
                 }
                 if (topic === "domwindowclosed") {
                     this.windowsOpen--;
                     return;
                 }
             },
 
-            shutdown: function() {
+            shutdown() {
                 var observerService = SpecialPowers.Cc["@mozilla.org/observer-service;1"]
                                                .getService(Ci.nsIObserverService);
                 observerService.removeObserver(this, "domwindowopened");
                 observerService.removeObserver(this, "domwindowclosed");
             },
 
-            reset: function() {
+            reset() {
                 this.windowsOpen = 0;
                 this.windowsRegistered = 0;
             }
         });
 
         var monitor = new dialogMonitor();
 
         var pwmgr, logins = [];
@@ -125,25 +125,25 @@
                                        .getService(Ci.nsIHttpAuthManager);
             authMgr.clearAll();
 
             monitor.shutdown();
             SimpleTest.finish();
         }
 
 	var resolveCallback = SpecialPowers.wrapCallbackObject({
-	QueryInterface : function(iid) {
+	QueryInterface(iid) {
 	const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports];
 
         if (!interfaces.some( function(v) { return iid.equals(v); } ))
           throw SpecialPowers.Cr.NS_ERROR_NO_INTERFACE;
 	  return this;
 	},
 
-	onProxyAvailable : function(req, uri, pi, status) {
+	onProxyAvailable(req, uri, pi, status) {
           initLogins(pi);
           doTest(testNum);
 	}
 	});
 
 	function startup() {
             // Need to allow for arbitrary network servers defined in PAC instead of a hardcoded moz-proxy.
             var channel = NetUtil.newChannel({
--- a/toolkit/components/printing/content/printPreviewBindings.xml
+++ b/toolkit/components/printing/content/printPreviewBindings.xml
@@ -214,18 +214,18 @@
             pageNum = this.mPageTextBox.value;  // TODO: back to valueNumber?
           } else {
             // We're going to a specific page (aPageNum)
             navType = nsIWebBrowserPrint.PRINTPREVIEW_GOTO_PAGENUM;
             pageNum = aPageNum;
           }
 
           this.mMessageManager.sendAsyncMessage("Printing:Preview:Navigate", {
-            navType: navType,
-            pageNum: pageNum,
+            navType,
+            pageNum,
           });
         ]]>
         </body>
       </method>
 
       <method name="print">
         <body>
         <![CDATA[
@@ -237,18 +237,18 @@
       <method name="promptForScaleValue">
         <parameter name="aValue"/>
         <body>
         <![CDATA[
           var value = Math.round(aValue);
           var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
           var promptStr = this.mScaleLabel.value;
           var renameTitle = this.mCustomTitle;
-          var result = {value:value};
-          var confirmed = promptService.prompt(window, renameTitle, promptStr, result, null, {value:value});
+          var result = {value};
+          var confirmed = promptService.prompt(window, renameTitle, promptStr, result, null, {value});
           if (!confirmed || (!result.value) || (result.value == "") || result.value == value) {
             return -1;
           }
           return result.value;
         ]]>
         </body>
       </method>
 
--- a/toolkit/components/satchel/test/test_form_autocomplete.html
+++ b/toolkit/components/satchel/test/test_form_autocomplete.html
@@ -1027,17 +1027,17 @@ function runTest() {
         ok(false, "Unexpected invocation of test #" + testNum);
         SimpleTest.finish();
         return;
   }
 }
 
 function addEntry(name, value)
 {
-  updateFormHistory({ op : "add", fieldname : name, value: value }, runTest);
+  updateFormHistory({ op : "add", fieldname : name, value }, runTest);
 }
 
 // Runs the next test when scroll event occurs
 function waitForScroll()
 {
   addEventListener("scroll", function() {
     if (!window.pageYOffset)
       return;
--- a/toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html
+++ b/toolkit/content/tests/mochitest/test_autocomplete_change_after_focus.html
@@ -19,17 +19,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   add_task(function* setup() {
     yield new Promise(resolve => {
       let chromeScript = SpecialPowers.loadChromeScript(function() {
         const {FormHistory} = Components.utils.import("resource://gre/modules/FormHistory.jsm", null);
         FormHistory.update([
           { op : "bump", fieldname: "field1", value: "Default text option" },
           { op : "bump", fieldname: "field1", value: "New value option" },
         ], {
-          handleCompletion: function() {
+          handleCompletion() {
             sendAsyncMessage("Test:Resume");
           },
         });
       });
 
       chromeScript.addMessageListener("Test:Resume", function resumeListener() {
         chromeScript.removeMessageListener("Test:Resume", resumeListener);
         chromeScript.destroy();
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -613,26 +613,26 @@
       </method>
 
       <field name="_valueIsPasted">false</field>
       <field name="_pasteController"><![CDATA[
         ({
           _autocomplete: this,
           _kGlobalClipboard: Components.interfaces.nsIClipboard.kGlobalClipboard,
           supportsCommand: aCommand => aCommand == "cmd_paste",
-          doCommand: function(aCommand) {
+          doCommand(aCommand) {
             this._autocomplete._valueIsPasted = true;
             this._autocomplete.editor.paste(this._kGlobalClipboard);
             this._autocomplete._valueIsPasted = false;
           },
-          isCommandEnabled: function(aCommand) {
+          isCommandEnabled(aCommand) {
             return this._autocomplete.editor.isSelectionEditable &&
                    this._autocomplete.editor.canPaste(this._kGlobalClipboard);
           },
-          onEvent: function() {}
+          onEvent() {}
         })
       ]]></field>
 
       <method name="onInput">
         <parameter name="aEvent"/>
         <body><![CDATA[
           if (!this.mIgnoreInput && this.mController.input == this) {
             this.valueIsTyped = true;
@@ -2348,17 +2348,17 @@ extends="chrome://global/content/binding
           if (!aUrl.startsWith("moz-action:"))
             return null;
 
           // URL is in the format moz-action:ACTION,PARAMS
           // Where PARAMS is a JSON encoded object.
           let [, type, params] = aUrl.match(/^moz-action:([^,]+),(.*)$/);
 
           let action = {
-            type: type,
+            type,
           };
 
           try {
             action.params = JSON.parse(params);
             for (let key in action.params) {
               action.params[key] = decodeURIComponent(action.params[key]);
             }
           } catch (e) {
--- a/toolkit/content/widgets/editor.xml
+++ b/toolkit/content/widgets/editor.xml
@@ -21,38 +21,38 @@
             this.makeEditable(this.editortype, true);
         ]]>
       </constructor>
       <destructor/>
 
       <field name="_editorContentListener">
         <![CDATA[
           ({
-            QueryInterface: function(iid)
+            QueryInterface(iid)
             {
               if (iid.equals(Components.interfaces.nsIURIContentListener) ||
                   iid.equals(Components.interfaces.nsISupportsWeakReference) ||
                   iid.equals(Components.interfaces.nsISupports))
               return this;
 
               throw Components.results.NS_ERROR_NO_INTERFACE;
             },
-            onStartURIOpen: function(uri)
+            onStartURIOpen(uri)
             {
               return false;
             },
-            doContent: function(contentType, isContentPreferred, request, contentHandler)
+            doContent(contentType, isContentPreferred, request, contentHandler)
             {
               return false;
             },
-            isPreferred: function(contentType, desiredContentType)
+            isPreferred(contentType, desiredContentType)
             {
               return false;
             },
-            canHandleContent: function(contentType, isContentPreferred, desiredContentType)
+            canHandleContent(contentType, isContentPreferred, desiredContentType)
             {
               return false;
             },
             loadCookie: null,
             parentContentListener: null
           })
         ]]>
       </field>
--- a/toolkit/content/widgets/findbar.xml
+++ b/toolkit/content/widgets/findbar.xml
@@ -311,26 +311,26 @@
           }
           return this.__prefsvc;
         ]]></getter>
       </property>
 
       <field name="_observer"><![CDATA[({
         _self: this,
 
-        QueryInterface: function(aIID) {
+        QueryInterface(aIID) {
           if (aIID.equals(Components.interfaces.nsIObserver) ||
               aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
               aIID.equals(Components.interfaces.nsISupports))
             return this;
 
           throw Components.results.NS_ERROR_NO_INTERFACE;
         },
 
-        observe: function(aSubject, aTopic, aPrefName) {
+        observe(aSubject, aTopic, aPrefName) {
           if (aTopic != "nsPref:changed")
             return;
 
           let prefsvc = this._self._prefsvc;
 
           switch (aPrefName) {
             case "accessibility.typeaheadfind":
               this._self._findAsYouType = prefsvc.getBoolPref(aPrefName);
--- a/toolkit/content/widgets/preferences.xml
+++ b/toolkit/content/widgets/preferences.xml
@@ -764,17 +764,17 @@
           this._selector.selectedItem = document.getAnonymousElementByAttribute(this, "pane", aPaneElement.id);
           if (!aPaneElement.loaded) {
             let OverlayLoadObserver = function(aPane)
             {
               this._pane = aPane;
             }
             OverlayLoadObserver.prototype = {
               _outer: this,
-              observe: function(aSubject, aTopic, aData)
+              observe(aSubject, aTopic, aData)
               {
                 this._pane.loaded = true;
                 this._outer._fireEvent("paneload", this._pane);
                 this._outer._selectPane(this._pane);
               }
             };
 
             var obs = new OverlayLoadObserver(aPaneElement);
--- a/toolkit/content/widgets/richlistbox.xml
+++ b/toolkit/content/widgets/richlistbox.xml
@@ -329,18 +329,18 @@
         </getter>
       </property>
 
       <field name="_builderListener" readonly="true">
         <![CDATA[
           ({
             mOuter: this,
             item: null,
-            willRebuild: function(builder) { },
-            didRebuild: function(builder) {
+            willRebuild(builder) { },
+            didRebuild(builder) {
               this.mOuter._refreshSelection();
             }
           });
         ]]>
       </field>
 
       <method name="_refreshSelection">
         <body>
--- a/toolkit/content/widgets/toolbar.xml
+++ b/toolkit/content/widgets/toolbar.xml
@@ -418,17 +418,17 @@
       <field name="_contextMenuListener"><![CDATA[({
         toolbar: this,
         contextMenu: null,
 
         get active() {
           return !!this.contextMenu;
         },
 
-        init: function(event) {
+        init(event) {
           var node = event.target;
           while (node != this.toolbar) {
             if (node.localName == "menupopup")
               return;
             node = node.parentNode;
           }
 
           var contextMenuId = this.toolbar.getAttribute("context");
@@ -438,17 +438,17 @@
           this.contextMenu = document.getElementById(contextMenuId);
           if (!this.contextMenu)
             return;
 
           this.contextMenu.addEventListener("popupshown", this, false);
           this.contextMenu.addEventListener("popuphiding", this, false);
           this.toolbar.addEventListener("mousemove", this, false);
         },
-        handleEvent: function(event) {
+        handleEvent(event) {
           switch (event.type) {
             case "popupshown":
               this.toolbar.removeEventListener("mousemove", this, false);
               break;
             case "popuphiding":
             case "mousemove":
               this.toolbar._setInactiveAsync();
               this.toolbar.removeEventListener("mousemove", this, false);
--- a/toolkit/mozapps/extensions/content/setting.xml
+++ b/toolkit/mozapps/extensions/content/setting.xml
@@ -26,27 +26,27 @@
 
         if (this.usePref)
           Services.prefs.addObserver(this.pref, this._observer, true);
       ]]></constructor>
 
       <field name="_observer"><![CDATA[({
         _self: this,
 
-        QueryInterface: function(aIID) {
+        QueryInterface(aIID) {
           const Ci = Components.interfaces;
           if (aIID.equals(Ci.nsIObserver) ||
               aIID.equals(Ci.nsISupportsWeakReference) ||
               aIID.equals(Ci.nsISupports))
             return this;
 
           throw Components.Exception("No interface", Components.results.NS_ERROR_NO_INTERFACE);
         },
 
-        observe: function(aSubject, aTopic, aPrefName) {
+        observe(aSubject, aTopic, aPrefName) {
           if (aTopic != "nsPref:changed")
             return;
 
           if (this._self.pref == aPrefName)
             this._self.preferenceChanged();
         }
       })]]>
       </field>
--- a/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
@@ -18,17 +18,17 @@ function installCallback(url, status) {
   window.dispatchEvent(event);
 }
 
 function startInstall() {
   InstallTrigger.install({
     "Unsigned XPI": {
       URL: "amosigned.xpi",
       IconURL: "icon.png",
-      toString: function() { return this.URL; }
+      toString() { return this.URL; }
     }
   }, installCallback);
 }
 </script>
 </head>
 <body onload="startInstall()">
 <p>InstallTrigger tests</p>
 <p id="return"></p>