merge 21dc2d95071cb7712af8552e3880ec325b1069f1 into stylo upstream draft
authorVCS Sync <vcs-sync@mozilla.com>
Fri, 30 Dec 2016 15:05:04 +0000
changeset 458236 326eeae934a50c342aa8a5284b7aeebdbfd1a56b
parent 458235 a95447d95bfb6d7947699c6720baac6822a59826 (current diff)
parent 454891 21dc2d95071cb7712af8552e3880ec325b1069f1 (diff)
child 458237 35b944a8e3928c8ecd0ed828a6ee4d0dbd905f63
push id40933
push userbmo:slyu@mozilla.com
push dateTue, 10 Jan 2017 06:53:24 +0000
milestone53.0a1
merge 21dc2d95071cb7712af8552e3880ec325b1069f1 into stylo upstream
netwerk/base/nsIURIWithQuery.idl
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -163,17 +163,17 @@ appUpdater.prototype =
   },
 
   /**
    * Sets the panel of the updateDeck.
    *
    * @param  aChildID
    *         The id of the deck's child to select, e.g. "apply".
    */
-  selectPanel: function(aChildID) {
+  selectPanel(aChildID) {
     let panel = document.getElementById(aChildID);
 
     let button = panel.querySelector("button");
     if (button) {
       if (aChildID == "downloadAndInstall") {
         let updateVersion = gAppUpdater.update.displayVersion;
         button.label = this.bundle.formatStringFromName("update.downloadAndInstallButton.label", [updateVersion], 1);
         button.accessKey = this.bundle.GetStringFromName("update.downloadAndInstallButton.accesskey");
@@ -186,17 +186,17 @@ appUpdater.prototype =
     } else {
       this.updateDeck.selectedPanel = panel;
     }
   },
 
   /**
    * Check for updates
    */
-  checkForUpdates: function() {
+  checkForUpdates() {
     // Clear prefs that could prevent a user from discovering available updates.
     if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) {
       Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX);
     }
     if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_ELEVATE_NEVER)) {
       Services.prefs.clearUserPref(PREF_APP_UPDATE_ELEVATE_NEVER);
     }
     this.selectPanel("checkingForUpdates");
@@ -204,17 +204,17 @@ appUpdater.prototype =
     this.checker.checkForUpdates(this.updateCheckListener, true);
     // after checking, onCheckComplete() is called
   },
 
   /**
    * Handles oncommand for the "Restart to Update" button
    * which is presented after the download has been downloaded.
    */
-  buttonRestartAfterDownload: function() {
+  buttonRestartAfterDownload() {
     if (!this.isPending && !this.isApplied) {
       return;
     }
 
     gAppUpdater.selectPanel("restarting");
 
     // Notify all windows that an application quit has been requested.
     let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
@@ -244,17 +244,17 @@ appUpdater.prototype =
    * Implements nsIUpdateCheckListener. The methods implemented by
    * nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload
    * to make it clear which are used by each interface.
    */
   updateCheckListener: {
     /**
      * See nsIUpdateService.idl
      */
-    onCheckComplete: function(aRequest, aUpdates, aUpdateCount) {
+    onCheckComplete(aRequest, aUpdates, aUpdateCount) {
       gAppUpdater.isChecking = false;
       gAppUpdater.update = gAppUpdater.aus.
                            selectUpdate(aUpdates, aUpdates.length);
       if (!gAppUpdater.update) {
         gAppUpdater.selectPanel("noUpdatesFound");
         return;
       }
 
@@ -276,39 +276,39 @@ appUpdater.prototype =
         gAppUpdater.startDownload();
       else // ask
         gAppUpdater.selectPanel("downloadAndInstall");
     },
 
     /**
      * See nsIUpdateService.idl
      */
-    onError: function(aRequest, aUpdate) {
+    onError(aRequest, aUpdate) {
       // Errors in the update check are treated as no updates found. If the
       // update check fails repeatedly without a success the user will be
       // notified with the normal app update user interface so this is safe.
       gAppUpdater.isChecking = false;
       gAppUpdater.selectPanel("noUpdatesFound");
     },
 
     /**
      * See nsISupports.idl
      */
-    QueryInterface: function(aIID) {
+    QueryInterface(aIID) {
       if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) &&
           !aIID.equals(Components.interfaces.nsISupports))
         throw Components.results.NS_ERROR_NO_INTERFACE;
       return this;
     }
   },
 
   /**
    * Starts the download of an update mar.
    */
-  startDownload: function() {
+  startDownload() {
     if (!this.update)
       this.update = this.um.activeUpdate;
     this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag);
     this.update.setProperty("foregroundDownload", "true");
 
     this.aus.pauseDownload();
     let state = this.aus.downloadUpdate(this.update, false);
     if (state == "failed") {
@@ -317,40 +317,40 @@ appUpdater.prototype =
     }
 
     this.setupDownloadingUI();
   },
 
   /**
    * Switches to the UI responsible for tracking the download.
    */
-  setupDownloadingUI: function() {
+  setupDownloadingUI() {
     this.downloadStatus = document.getElementById("downloadStatus");
     this.downloadStatus.value =
       DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size);
     this.selectPanel("downloading");
     this.aus.addDownloadListener(this);
   },
 
-  removeDownloadListener: function() {
+  removeDownloadListener() {
     if (this.aus) {
       this.aus.removeDownloadListener(this);
     }
   },
 
   /**
    * See nsIRequestObserver.idl
    */
-  onStartRequest: function(aRequest, aContext) {
+  onStartRequest(aRequest, aContext) {
   },
 
   /**
    * See nsIRequestObserver.idl
    */
-  onStopRequest: function(aRequest, aContext, aStatusCode) {
+  onStopRequest(aRequest, aContext, aStatusCode) {
     switch (aStatusCode) {
     case Components.results.NS_ERROR_UNEXPECTED:
       if (this.update.selectedPatch.state == "download-failed" &&
           (this.update.isCompleteUpdate || this.update.patchCount != 2)) {
         // Verification error of complete patch, informational text is held in
         // the update object.
         this.removeDownloadListener();
         this.selectPanel("downloadFailed");
@@ -399,30 +399,30 @@ appUpdater.prototype =
       this.selectPanel("downloadFailed");
       break;
     }
   },
 
   /**
    * See nsIProgressEventSink.idl
    */
-  onStatus: function(aRequest, aContext, aStatus, aStatusArg) {
+  onStatus(aRequest, aContext, aStatus, aStatusArg) {
   },
 
   /**
    * See nsIProgressEventSink.idl
    */
-  onProgress: function(aRequest, aContext, aProgress, aProgressMax) {
+  onProgress(aRequest, aContext, aProgress, aProgressMax) {
     this.downloadStatus.value =
       DownloadUtils.getTransferTotal(aProgress, aProgressMax);
   },
 
   /**
    * See nsISupports.idl
    */
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (!aIID.equals(Components.interfaces.nsIProgressEventSink) &&
         !aIID.equals(Components.interfaces.nsIRequestObserver) &&
         !aIID.equals(Components.interfaces.nsISupports))
       throw Components.results.NS_ERROR_NO_INTERFACE;
     return this;
   }
 };
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -96,17 +96,17 @@ function updateDisplayedEmail(user) {
   if (emailDiv && user) {
     emailDiv.textContent = user.email;
   }
 }
 
 var wrapper = {
   iframe: null,
 
-  init: function(url, urlParams) {
+  init(url, urlParams) {
     // If a master-password is enabled, we want to encourage the user to
     // unlock it.  Things still work if not, but the user will probably need
     // to re-auth next startup (in which case we will get here again and
     // re-prompt)
     Utils.ensureMPUnlocked();
 
     let iframe = document.getElementById("remote");
     this.iframe = iframe;
@@ -125,27 +125,27 @@ var wrapper = {
     this.url = url;
     // Set the iframe's location with loadURI/LOAD_FLAGS_REPLACE_HISTORY to
     // avoid having a new history entry being added. REPLACE_HISTORY is used
     // to replace the current entry, which is `about:blank`.
     let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null);
   },
 
-  retry: function() {
+  retry() {
     let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
   },
 
   iframeListener: {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference,
                                          Ci.nsISupports]),
 
-    onStateChange: function(aWebProgress, aRequest, aState, aStatus) {
+    onStateChange(aWebProgress, aRequest, aState, aStatus) {
       let failure = false;
 
       // Captive portals sometimes redirect users
       if ((aState & Ci.nsIWebProgressListener.STATE_REDIRECTING)) {
         failure = true;
       } else if ((aState & Ci.nsIWebProgressListener.STATE_STOP)) {
         if (aRequest instanceof Ci.nsIHttpChannel) {
           try {
@@ -159,29 +159,29 @@ var wrapper = {
       // Calling cancel() will raise some OnStateChange notifications by itself,
       // so avoid doing that more than once
       if (failure && aStatus != Components.results.NS_BINDING_ABORTED) {
         aRequest.cancel(Components.results.NS_BINDING_ABORTED);
         setErrorPage("networkError");
       }
     },
 
-    onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {
+    onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
       if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) {
         aRequest.cancel(Components.results.NS_BINDING_ABORTED);
         setErrorPage("networkError");
       }
     },
 
-    onProgressChange: function() {},
-    onStatusChange: function() {},
-    onSecurityChange: function() {},
+    onProgressChange() {},
+    onStatusChange() {},
+    onSecurityChange() {},
   },
 
-  handleEvent: function(evt) {
+  handleEvent(evt) {
     switch (evt.type) {
       case "load":
         this.iframe.contentWindow.addEventListener("FirefoxAccountsCommand", this);
         this.iframe.removeEventListener("load", this);
         break;
       case "FirefoxAccountsCommand":
         this.handleRemoteCommand(evt);
         break;
@@ -189,17 +189,17 @@ var wrapper = {
   },
 
   /**
    * onLogin handler receives user credentials from the jelly after a
    * sucessful login and stores it in the fxaccounts service
    *
    * @param accountData the user's account data and credentials
    */
-  onLogin: function(accountData) {
+  onLogin(accountData) {
     log("Received: 'login'. Data:" + JSON.stringify(accountData));
 
     if (accountData.customizeSync) {
       Services.prefs.setBoolPref(PREF_SYNC_SHOW_CUSTOMIZATION, true);
     }
     delete accountData.customizeSync;
     // sessionTokenContext is erroneously sent by the content server.
     // https://github.com/mozilla/fxa-content-server/issues/2766
@@ -246,35 +246,35 @@ var wrapper = {
       // the verification completes (the browser will begin syncing, but
       // won't notify the user). If the email has already been verified,
       // the jelly will say "Welcome! You are successfully signed in as
       // EMAIL", but it won't then say "syncing started".
     }, (err) => this.injectData("message", { status: "error", error: err })
     );
   },
 
-  onCanLinkAccount: function(accountData) {
+  onCanLinkAccount(accountData) {
     // We need to confirm a relink - see shouldAllowRelink for more
     let ok = shouldAllowRelink(accountData.email);
-    this.injectData("message", { status: "can_link_account", data: { ok: ok } });
+    this.injectData("message", { status: "can_link_account", data: { ok } });
   },
 
   /**
    * onSignOut handler erases the current user's session from the fxaccounts service
    */
-  onSignOut: function() {
+  onSignOut() {
     log("Received: 'sign_out'.");
 
     fxAccounts.signOut().then(
       () => this.injectData("message", { status: "sign_out" }),
       (err) => this.injectData("message", { status: "error", error: err })
     );
   },
 
-  handleRemoteCommand: function(evt) {
+  handleRemoteCommand(evt) {
     log('command: ' + evt.detail.command);
     let data = evt.detail.data;
 
     switch (evt.detail.command) {
       case "login":
         this.onLogin(data);
         break;
       case "can_link_account":
@@ -284,21 +284,21 @@ var wrapper = {
         this.onSignOut(data);
         break;
       default:
         log("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
-  injectData: function(type, content) {
+  injectData(type, content) {
     return fxAccounts.promiseAccountsSignUpURI().then(authUrl => {
       let data = {
-        type: type,
-        content: content
+        type,
+        content
       };
       this.iframe.contentWindow.postMessage(data, authUrl);
     })
     .catch(e => {
       console.log("Failed to inject data", e);
       setErrorPage("configError");
     });
   },
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -10,111 +10,111 @@ Cu.import("resource://gre/modules/Prefer
 Cu.import("resource://gre/modules/Services.jsm");
 
 const prefs = new Preferences("datareporting.healthreport.");
 
 const PREF_UNIFIED = "toolkit.telemetry.unified";
 const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl";
 
 var healthReportWrapper = {
-  init: function() {
+  init() {
     let iframe = document.getElementById("remote-report");
     iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
     iframe.src = this._getReportURI().spec;
     prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
-  uninit: function() {
+  uninit() {
     prefs.ignore("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
-  _getReportURI: function() {
+  _getReportURI() {
     let url = Services.urlFormatter.formatURLPref(PREF_REPORTING_URL);
     return Services.io.newURI(url, null, null);
   },
 
-  setDataSubmission: function(enabled) {
+  setDataSubmission(enabled) {
     MozSelfSupport.healthReportDataSubmissionEnabled = enabled;
     this.updatePrefState();
   },
 
-  updatePrefState: function() {
+  updatePrefState() {
     try {
       let prefsObj = {
         enabled: MozSelfSupport.healthReportDataSubmissionEnabled,
       };
       healthReportWrapper.injectData("prefs", prefsObj);
     }
     catch (ex) {
       healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PREFS_FAILED);
     }
   },
 
-  sendTelemetryPingList: function() {
+  sendTelemetryPingList() {
     console.log("AboutHealthReport: Collecting Telemetry ping list.");
     MozSelfSupport.getTelemetryPingList().then((list) => {
       console.log("AboutHealthReport: Sending Telemetry ping list.");
       this.injectData("telemetry-ping-list", list);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting ping list failed: " + ex);
     });
   },
 
-  sendTelemetryPingData: function(pingId) {
+  sendTelemetryPingData(pingId) {
     console.log("AboutHealthReport: Collecting Telemetry ping data.");
     MozSelfSupport.getTelemetryPing(pingId).then((ping) => {
       console.log("AboutHealthReport: Sending Telemetry ping data.");
       this.injectData("telemetry-ping-data", {
         id: pingId,
         pingData: ping,
       });
     }).catch((ex) => {
       console.log("AboutHealthReport: Loading ping data failed: " + ex);
       this.injectData("telemetry-ping-data", {
         id: pingId,
         error: "error-generic",
       });
     });
   },
 
-  sendCurrentEnvironment: function() {
+  sendCurrentEnvironment() {
     console.log("AboutHealthReport: Sending Telemetry environment data.");
     MozSelfSupport.getCurrentTelemetryEnvironment().then((environment) => {
       this.injectData("telemetry-current-environment-data", environment);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting current environment data failed: " + ex);
     });
   },
 
-  sendCurrentPingData: function() {
+  sendCurrentPingData() {
     console.log("AboutHealthReport: Sending current Telemetry ping data.");
     MozSelfSupport.getCurrentTelemetrySubsessionPing().then((ping) => {
       this.injectData("telemetry-current-ping-data", ping);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting current ping data failed: " + ex);
     });
   },
 
-  injectData: function(type, content) {
+  injectData(type, content) {
     let report = this._getReportURI();
 
     // file URIs can't be used for targetOrigin, so we use "*" for this special case
     // in all other cases, pass in the URL to the report so we properly restrict the message dispatch
     let reportUrl = report.scheme == "file" ? "*" : report.spec;
 
     let data = {
-      type: type,
-      content: content
+      type,
+      content
     }
 
     let iframe = document.getElementById("remote-report");
     iframe.contentWindow.postMessage(data, reportUrl);
   },
 
-  handleRemoteCommand: function(evt) {
+  handleRemoteCommand(evt) {
     // Do an origin check to harden against the frame content being loaded from unexpected locations.
     let allowedPrincipal = Services.scriptSecurityManager.getCodebasePrincipal(this._getReportURI());
     let targetPrincipal = evt.target.nodePrincipal;
     if (!allowedPrincipal.equals(targetPrincipal)) {
       Cu.reportError(`Origin check failed for message "${evt.detail.command}": ` +
                      `target origin is "${targetPrincipal.origin}", expected "${allowedPrincipal.origin}"`);
       return;
     }
@@ -142,39 +142,39 @@ var healthReportWrapper = {
         this.sendCurrentPingData();
         break;
       default:
         Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
-  initRemotePage: function() {
+  initRemotePage() {
     let iframe = document.getElementById("remote-report").contentDocument;
     iframe.addEventListener("RemoteHealthReportCommand",
                             function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); },
                             false);
     healthReportWrapper.updatePrefState();
   },
 
   // error handling
   ERROR_INIT_FAILED:    1,
   ERROR_PAYLOAD_FAILED: 2,
   ERROR_PREFS_FAILED:   3,
 
-  reportFailure: function(error) {
+  reportFailure(error) {
     let details = {
       errorType: error,
     }
     healthReportWrapper.injectData("error", details);
   },
 
-  handleInitFailure: function() {
+  handleInitFailure() {
     healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED);
   },
 
-  handlePayloadFailure: function() {
+  handlePayloadFailure() {
     healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED);
   },
 }
 
 window.addEventListener("load", function() { healthReportWrapper.init(); });
 window.addEventListener("unload", function() { healthReportWrapper.uninit(); });
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -181,28 +181,28 @@ function ensureSnippetsMapThen(aCallback
         cache.set(cursor.key, cursor.value);
         cursor.continue();
         return;
       }
 
       // The cache has been filled up, create the snippets map.
       gSnippetsMap = Object.freeze({
         get: (aKey) => cache.get(aKey),
-        set: function(aKey, aValue) {
+        set(aKey, aValue) {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).put(aValue, aKey);
           return cache.set(aKey, aValue);
         },
         has: (aKey) => cache.has(aKey),
-        delete: function(aKey) {
+        delete(aKey) {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).delete(aKey);
           return cache.delete(aKey);
         },
-        clear: function() {
+        clear() {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).clear();
           return cache.clear();
         },
         get size() { return cache.size; },
       });
 
       setTimeout(invokeCallbacks, 0);
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -25,43 +25,43 @@ function removeNotificationOnEnd(notific
       onDownloadFailed: maybeRemove,
       onInstallFailed: maybeRemove,
       onInstallEnded: maybeRemove
     });
   }
 }
 
 const gXPInstallObserver = {
-  _findChildShell: function(aDocShell, aSoughtShell)
+  _findChildShell(aDocShell, aSoughtShell)
   {
     if (aDocShell == aSoughtShell)
       return aDocShell;
 
     var node = aDocShell.QueryInterface(Components.interfaces.nsIDocShellTreeItem);
     for (var i = 0; i < node.childCount; ++i) {
       var docShell = node.getChildAt(i);
       docShell = this._findChildShell(docShell, aSoughtShell);
       if (docShell == aSoughtShell)
         return docShell;
     }
     return null;
   },
 
-  _getBrowser: function(aDocShell)
+  _getBrowser(aDocShell)
   {
     for (let browser of gBrowser.browsers) {
       if (this._findChildShell(browser.docShell, aDocShell))
         return browser;
     }
     return null;
   },
 
   pendingInstalls: new WeakMap(),
 
-  showInstallConfirmation: function(browser, installInfo, height = undefined) {
+  showInstallConfirmation(browser, installInfo, height = undefined) {
     // If the confirmation notification is already open cache the installInfo
     // and the new confirmation will be shown later
     if (PopupNotifications.getNotification("addon-install-confirmation", browser)) {
       let pending = this.pendingInstalls.get(browser);
       if (pending) {
         pending.push(installInfo);
       } else {
         this.pendingInstalls.set(browser, [installInfo]);
@@ -212,17 +212,17 @@ const gXPInstallObserver = {
 
     removeNotificationOnEnd(popup, installInfo.installs);
 
     Services.telemetry
             .getHistogramById("SECURITY_UI")
             .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL);
   },
 
-  observe: function(aSubject, aTopic, aData)
+  observe(aSubject, aTopic, aData)
   {
     var brandBundle = document.getElementById("bundle_brand");
     var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     var browser = installInfo.browser;
 
     // Make sure the browser is still alive.
     if (!browser || gBrowser.browsers.indexOf(browser) == -1)
       return;
@@ -277,17 +277,17 @@ const gXPInstallObserver = {
     case "addon-install-blocked": {
       messageString = gNavigatorBundle.getFormattedString("xpinstallPromptMessage",
                         [brandShortName]);
 
       let secHistogram = Components.classes["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry).getHistogramById("SECURITY_UI");
       action = {
         label: gNavigatorBundle.getString("xpinstallPromptAllowButton"),
         accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"),
-        callback: function() {
+        callback() {
           secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH);
           installInfo.install();
         }
       };
 
       secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED);
       let popup = PopupNotifications.show(browser, notificationID,
                                           messageString, anchorID,
@@ -428,17 +428,17 @@ const gXPInstallObserver = {
       let secondaryActions = null;
 
       if (needsRestart) {
         notificationID = "addon-install-restart";
         messageString = gNavigatorBundle.getString("addonsInstalledNeedsRestart");
         action = {
           label: gNavigatorBundle.getString("addonInstallRestartButton"),
           accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"),
-          callback: function() {
+          callback() {
             BrowserUtils.restartApplication();
           }
         };
         secondaryActions = [{
           label: gNavigatorBundle.getString("addonInstallRestartIgnoreButton"),
           accessKey: gNavigatorBundle.getString("addonInstallRestartIgnoreButton.accesskey"),
           callback: () => {},
         }];
@@ -467,24 +467,24 @@ const gXPInstallObserver = {
   _removeProgressNotification(aBrowser) {
     let notification = PopupNotifications.getNotification("addon-progress", aBrowser);
     if (notification)
       notification.remove();
   }
 };
 
 var LightWeightThemeWebInstaller = {
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("LightWeightThemeWebInstaller:Install", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     // ignore requests from background tabs
     if (message.target != gBrowser.selectedBrowser) {
       return;
     }
 
     let data = message.data;
 
     switch (message.name) {
@@ -498,33 +498,33 @@ var LightWeightThemeWebInstaller = {
       }
       case "LightWeightThemeWebInstaller:ResetPreview": {
         this._resetPreview(data && data.baseURI);
         break;
       }
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "TabSelect": {
         this._resetPreview();
         break;
       }
     }
   },
 
   get _manager() {
     let temp = {};
     Cu.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
     delete this._manager;
     return this._manager = temp.LightweightThemeManager;
   },
 
-  _installRequest: function(dataString, baseURI) {
+  _installRequest(dataString, baseURI) {
     let data = this._manager.parseTheme(dataString, baseURI);
 
     if (!data) {
       return;
     }
 
     let uri = makeURI(baseURI);
 
@@ -555,136 +555,136 @@ var LightWeightThemeWebInstaller = {
     let allowButtonAccesskey =
       gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey");
     let message =
       gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message",
                                           [uri.host]);
     let buttons = [{
       label: allowButtonText,
       accessKey: allowButtonAccesskey,
-      callback: function() {
+      callback() {
         LightWeightThemeWebInstaller._install(data, notify);
       }
     }];
 
     this._removePreviousNotifications();
 
     let notificationBox = gBrowser.getNotificationBox();
     let notificationBar =
       notificationBox.appendNotification(message, "lwtheme-install-request", "",
                                          notificationBox.PRIORITY_INFO_MEDIUM,
                                          buttons);
     notificationBar.persistence = 1;
   },
 
-  _install: function(newLWTheme, notify) {
+  _install(newLWTheme, notify) {
     let previousLWTheme = this._manager.currentTheme;
 
     let listener = {
-      onEnabling: function(aAddon, aRequiresRestart) {
+      onEnabling(aAddon, aRequiresRestart) {
         if (!aRequiresRestart) {
           return;
         }
 
         let messageString = gNavigatorBundle.getFormattedString("lwthemeNeedsRestart.message",
           [aAddon.name], 1);
 
         let action = {
           label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"),
           accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"),
-          callback: function() {
+          callback() {
             BrowserUtils.restartApplication();
           }
         };
 
         let options = {
           persistent: true
         };
 
         PopupNotifications.show(gBrowser.selectedBrowser, "addon-theme-change",
                                 messageString, "addons-notification-icon",
                                 action, null, options);
       },
 
-      onEnabled: function(aAddon) {
+      onEnabled(aAddon) {
         if (notify) {
           LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme);
         }
       }
     };
 
     AddonManager.addAddonListener(listener);
     this._manager.currentTheme = newLWTheme;
     AddonManager.removeAddonListener(listener);
   },
 
-  _postInstallNotification: function(newTheme, previousTheme) {
+  _postInstallNotification(newTheme, previousTheme) {
     function text(id) {
       return gNavigatorBundle.getString("lwthemePostInstallNotification." + id);
     }
 
     let buttons = [{
       label: text("undoButton"),
       accessKey: text("undoButton.accesskey"),
-      callback: function() {
+      callback() {
         LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id);
         LightWeightThemeWebInstaller._manager.currentTheme = previousTheme;
       }
     }, {
       label: text("manageButton"),
       accessKey: text("manageButton.accesskey"),
-      callback: function() {
+      callback() {
         BrowserOpenAddonsMgr("addons://list/theme");
       }
     }];
 
     this._removePreviousNotifications();
 
     let notificationBox = gBrowser.getNotificationBox();
     let notificationBar =
       notificationBox.appendNotification(text("message"),
                                          "lwtheme-install-notification", "",
                                          notificationBox.PRIORITY_INFO_MEDIUM,
                                          buttons);
     notificationBar.persistence = 1;
     notificationBar.timeout = Date.now() + 20000; // 20 seconds
   },
 
-  _removePreviousNotifications: function() {
+  _removePreviousNotifications() {
     let box = gBrowser.getNotificationBox();
 
     ["lwtheme-install-request",
      "lwtheme-install-notification"].forEach(function(value) {
         let notification = box.getNotificationWithValue(value);
         if (notification)
           box.removeNotification(notification);
       });
   },
 
-  _preview: function(dataString, baseURI) {
+  _preview(dataString, baseURI) {
     if (!this._isAllowed(baseURI))
       return;
 
     let data = this._manager.parseTheme(dataString, baseURI);
     if (!data)
       return;
 
     this._resetPreview();
     gBrowser.tabContainer.addEventListener("TabSelect", this, false);
     this._manager.previewTheme(data);
   },
 
-  _resetPreview: function(baseURI) {
+  _resetPreview(baseURI) {
     if (baseURI && !this._isAllowed(baseURI))
       return;
     gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
     this._manager.resetPreview();
   },
 
-  _isAllowed: function(srcURIString) {
+  _isAllowed(srcURIString) {
     let uri;
     try {
       uri = makeURI(srcURIString);
     }
     catch (e) {
       // makeURI fails if srcURIString is a nonsense URI
       return false;
     }
@@ -699,50 +699,50 @@ var LightWeightThemeWebInstaller = {
 };
 
 /*
  * Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
  */
 var LightweightThemeListener = {
   _modifiedStyles: [],
 
-  init: function() {
+  init() {
     XPCOMUtils.defineLazyGetter(this, "styleSheet", function() {
       for (let i = document.styleSheets.length - 1; i >= 0; i--) {
         let sheet = document.styleSheets[i];
         if (sheet.href == "chrome://browser/skin/browser-lightweightTheme.css")
           return sheet;
       }
       return undefined;
     });
 
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.addObserver(this, "lightweight-theme-optimized", false);
     if (document.documentElement.hasAttribute("lwtheme"))
       this.updateStyleSheet(document.documentElement.style.backgroundImage);
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(this, "lightweight-theme-styling-update");
     Services.obs.removeObserver(this, "lightweight-theme-optimized");
   },
 
   /**
    * Append the headerImage to the background-image property of all rulesets in
    * browser-lightweightTheme.css.
    *
    * @param headerImage - a string containing a CSS image for the lightweight theme header.
    */
-  updateStyleSheet: function(headerImage) {
+  updateStyleSheet(headerImage) {
     if (!this.styleSheet)
       return;
     this.substituteRules(this.styleSheet.cssRules, headerImage);
   },
 
-  substituteRules: function(ruleList, headerImage, existingStyleRulesModified = 0) {
+  substituteRules(ruleList, headerImage, existingStyleRulesModified = 0) {
     let styleRulesModified = 0;
     for (let i = 0; i < ruleList.length; i++) {
       let rule = ruleList[i];
       if (rule instanceof Ci.nsIDOMCSSGroupingRule) {
         // Add the number of modified sub-rules to the modified count
         styleRulesModified += this.substituteRules(rule.cssRules, headerImage, existingStyleRulesModified + styleRulesModified);
       } else if (rule instanceof Ci.nsIDOMCSSStyleRule) {
         if (!rule.style.backgroundImage)
@@ -756,17 +756,17 @@ var LightweightThemeListener = {
       } else {
         Cu.reportError("Unsupported rule encountered");
       }
     }
     return styleRulesModified;
   },
 
   // nsIObserver
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     if ((aTopic != "lightweight-theme-styling-update" && aTopic != "lightweight-theme-optimized") ||
           !this.styleSheet)
       return;
 
     if (aTopic == "lightweight-theme-optimized" && aSubject != window)
       return;
 
     let themeData = JSON.parse(aData);
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -91,39 +91,39 @@ var tabPreviews = {
       case "SSTabRestored":
         this.capture(event.target, true);
         break;
     }
   }
 };
 
 var tabPreviewPanelHelper = {
-  opening: function(host) {
+  opening(host) {
     host.panel.hidden = false;
 
     var handler = this._generateHandler(host);
     host.panel.addEventListener("popupshown", handler, false);
     host.panel.addEventListener("popuphiding", handler, false);
 
     host._prevFocus = document.commandDispatcher.focusedElement;
   },
-  _generateHandler: function(host) {
+  _generateHandler(host) {
     var self = this;
     return function(event) {
       if (event.target == host.panel) {
         host.panel.removeEventListener(event.type, arguments.callee, false);
         self["_" + event.type](host);
       }
     };
   },
-  _popupshown: function(host) {
+  _popupshown(host) {
     if ("setupGUI" in host)
       host.setupGUI();
   },
-  _popuphiding: function(host) {
+  _popuphiding(host) {
     if ("suspendGUI" in host)
       host.suspendGUI();
 
     if (host._prevFocus) {
       Services.focus.setFocus(host._prevFocus, Ci.nsIFocusManager.FLAG_NOSCROLL);
       host._prevFocus = null;
     } else
       gBrowser.selectedBrowser.focus();
@@ -214,17 +214,17 @@ var ctrlTab = {
       (!gPrefService.prefHasUserValue("browser.ctrlTab.disallowForScreenReaders") ||
        !gPrefService.getBoolPref("browser.ctrlTab.disallowForScreenReaders"));
 
     if (enable)
       this.init();
     else
       this.uninit();
   },
-  observe: function(aSubject, aTopic, aPrefName) {
+  observe(aSubject, aTopic, aPrefName) {
     this.readPref();
   },
 
   updatePreviews: function ctrlTab_updatePreviews() {
     for (let i = 0; i < this.previews.length; i++)
       this.updatePreview(this.previews[i], this.tabList[i]);
 
     var showAllLabel = gNavigatorBundle.getString("ctrlTab.listAllTabs.label");
@@ -502,31 +502,31 @@ var ctrlTab = {
         break;
       case "popupshowing":
         if (event.target.id == "menu_viewPopup")
           document.getElementById("menu_showAllTabs").hidden = !allTabs.canOpen;
         break;
     }
   },
 
-  filterForThumbnailExpiration: function(aCallback) {
+  filterForThumbnailExpiration(aCallback) {
     // Save a few more thumbnails than we actually display, so that when tabs
     // are closed, the previews we add instead still get thumbnails.
     const extraThumbnails = 3;
     const thumbnailCount = Math.min(this.tabPreviewCount + extraThumbnails,
                                     this.tabCount);
 
     let urls = [];
     for (let i = 0; i < thumbnailCount; i++)
       urls.push(this.tabList[i].linkedBrowser.currentURI.spec);
 
     aCallback(urls);
   },
 
-  _initRecentlyUsedTabs: function() {
+  _initRecentlyUsedTabs() {
     this._recentlyUsedTabs =
       Array.filter(gBrowser.tabs, tab => !tab.closing)
            .sort((tab1, tab2) => tab2.lastAccessed - tab1.lastAccessed);
   },
 
   _init: function ctrlTab__init(enable) {
     var toggleEventListener = enable ? "addEventListener" : "removeEventListener";
 
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -4,35 +4,35 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Customization handler prepares this browser window for entering and exiting
  * customization mode by handling customizationstarting and customizationending
  * events.
  */
 var CustomizationHandler = {
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "customizationstarting":
         this._customizationStarting();
         break;
       case "customizationchange":
         this._customizationChange();
         break;
       case "customizationending":
         this._customizationEnding(aEvent.detail);
         break;
     }
   },
 
-  isCustomizing: function() {
+  isCustomizing() {
     return document.documentElement.hasAttribute("customizing");
   },
 
-  _customizationStarting: function() {
+  _customizationStarting() {
     // Disable the toolbar context menu items
     let menubar = document.getElementById("main-menubar");
     for (let childNode of menubar.childNodes)
       childNode.setAttribute("disabled", true);
 
     let cmd = document.getElementById("cmd_CustomizeToolbars");
     cmd.setAttribute("disabled", "true");
 
@@ -46,21 +46,21 @@ var CustomizationHandler = {
     // can cause the customize tab to get clipped.
     let tabContainer = gBrowser.tabContainer;
     if (tabContainer.getAttribute("overflow") == "true") {
       let tabstrip = tabContainer.mTabstrip;
       tabstrip.ensureElementIsVisible(gBrowser.selectedTab, true);
     }
   },
 
-  _customizationChange: function() {
+  _customizationChange() {
     PlacesToolbarHelper.customizeChange();
   },
 
-  _customizationEnding: function(aDetails) {
+  _customizationEnding(aDetails) {
     // Update global UI elements that may have been added or removed
     if (aDetails.changed) {
       gURLBar = document.getElementById("urlbar");
 
       gHomeButton.updateTooltip();
       XULBrowserWindow.init();
 
       if (AppConstants.platform != "macosx")
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -22,33 +22,33 @@ var gDataNotificationInfoBar = {
   },
 
   get _log() {
     let Log = Cu.import("resource://gre/modules/Log.jsm", {}).Log;
     delete this._log;
     return this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX);
   },
 
-  init: function() {
+  init() {
     window.addEventListener("unload", () => {
       for (let o of this._OBSERVERS) {
         Services.obs.removeObserver(this, o);
       }
     }, false);
 
     for (let o of this._OBSERVERS) {
       Services.obs.addObserver(this, o, true);
     }
   },
 
-  _getDataReportingNotification: function(name = this._DATA_REPORTING_NOTIFICATION) {
+  _getDataReportingNotification(name = this._DATA_REPORTING_NOTIFICATION) {
     return this._notificationBox.getNotificationWithValue(name);
   },
 
-  _displayDataPolicyInfoBar: function(request) {
+  _displayDataPolicyInfoBar(request) {
     if (this._getDataReportingNotification()) {
       return;
     }
 
     let brandBundle = document.getElementById("bundle_brand");
     let appName = brandBundle.getString("brandShortName");
     let vendorName = brandBundle.getString("vendorShortName");
 
@@ -83,25 +83,25 @@ var gDataNotificationInfoBar = {
     );
     // It is important to defer calling onUserNotifyComplete() until we're
     // actually sure the notification was displayed. If we ever called
     // onUserNotifyComplete() without showing anything to the user, that
     // would be very good for user choice. It may also have legal impact.
     request.onUserNotifyComplete();
   },
 
-  _clearPolicyNotification: function() {
+  _clearPolicyNotification() {
     let notification = this._getDataReportingNotification();
     if (notification) {
       this._log.debug("Closing notification.");
       notification.close();
     }
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "datareporting:notify-data-policy:request":
         let request = subject.wrappedJSObject.object;
         try {
           this._displayDataPolicyInfoBar(request);
         } catch (ex) {
           request.onUserNotifyFailed(ex);
           return;
--- a/browser/base/content/browser-devedition.js
+++ b/browser/base/content/browser-devedition.js
@@ -16,55 +16,55 @@ var DevEdition = {
     return this.styleSheet && !this.styleSheet.sheet.disabled;
   },
 
   get isThemeCurrentlyApplied() {
     let theme = LightweightThemeManager.currentTheme;
     return theme && theme.id == "firefox-devedition@mozilla.org";
   },
 
-  init: function() {
+  init() {
     this.initialized = true;
     Services.prefs.addObserver(this._devtoolsThemePrefName, this, false);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.addObserver(this, "lightweight-theme-window-updated", false);
     this._updateDevtoolsThemeAttribute();
 
     if (this.isThemeCurrentlyApplied) {
       this._toggleStyleSheet(true);
     }
   },
 
-  createStyleSheet: function() {
+  createStyleSheet() {
     let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`;
     this.styleSheet = document.createProcessingInstruction(
       "xml-stylesheet", styleSheetAttr);
     this.styleSheet.addEventListener("load", this);
     document.insertBefore(this.styleSheet, document.documentElement);
     this.styleSheet.sheet.disabled = true;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "lightweight-theme-styling-update") {
       let newTheme = JSON.parse(data);
       if (newTheme && newTheme.id == "firefox-devedition@mozilla.org") {
         this._toggleStyleSheet(true);
       } else {
         this._toggleStyleSheet(false);
       }
     } else if (topic == "lightweight-theme-window-updated" && subject == window) {
       this._updateLWTBrightness();
     }
 
     if (topic == "nsPref:changed" && data == this._devtoolsThemePrefName) {
       this._updateDevtoolsThemeAttribute();
     }
   },
 
-  _inferBrightness: function() {
+  _inferBrightness() {
     ToolbarIconColor.inferFromText();
     // Get an inverted full screen button if the dark theme is applied.
     if (this.isStyleSheetEnabled &&
         document.documentElement.getAttribute("devtoolstheme") == "dark") {
       document.documentElement.setAttribute("brighttitlebarforeground", "true");
     } else {
       document.documentElement.removeAttribute("brighttitlebarforeground");
     }
@@ -73,61 +73,61 @@ var DevEdition = {
   _updateLWTBrightness() {
     if (this.isThemeCurrentlyApplied) {
       let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
       let textColor = devtoolsTheme == "dark" ? "bright" : "dark";
       document.documentElement.setAttribute("lwthemetextcolor", textColor);
     }
   },
 
-  _updateDevtoolsThemeAttribute: function() {
+  _updateDevtoolsThemeAttribute() {
     // Set an attribute on root element to make it possible
     // to change colors based on the selected devtools theme.
     let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
     if (devtoolsTheme != "dark") {
       devtoolsTheme = "light";
     }
     document.documentElement.setAttribute("devtoolstheme", devtoolsTheme);
     this._updateLWTBrightness();
     this._inferBrightness();
   },
 
-  handleEvent: function(e) {
+  handleEvent(e) {
     if (e.type === "load") {
       this.styleSheet.removeEventListener("load", this);
       this.refreshBrowserDisplay();
     }
   },
 
-  refreshBrowserDisplay: function() {
+  refreshBrowserDisplay() {
     // Don't touch things on the browser if gBrowserInit.onLoad hasn't
     // yet fired.
     if (this.initialized) {
       gBrowser.tabContainer._positionPinnedTabs();
       this._inferBrightness();
     }
   },
 
-  _toggleStyleSheet: function(deveditionThemeEnabled) {
+  _toggleStyleSheet(deveditionThemeEnabled) {
     let wasEnabled = this.isStyleSheetEnabled;
     if (deveditionThemeEnabled && !wasEnabled) {
       // The stylesheet may not have been created yet if it wasn't
       // needed on initial load.  Make it now.
       if (!this.styleSheet) {
         this.createStyleSheet();
       }
       this.styleSheet.sheet.disabled = false;
       this.refreshBrowserDisplay();
     } else if (!deveditionThemeEnabled && wasEnabled) {
       this.styleSheet.sheet.disabled = true;
       this.refreshBrowserDisplay();
     }
   },
 
-  uninit: function() {
+  uninit() {
     Services.prefs.removeObserver(this._devtoolsThemePrefName, this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.removeObserver(this, "lightweight-theme-window-updated", false);
     if (this.styleSheet) {
       this.styleSheet.removeEventListener("load", this);
     }
     this.styleSheet = null;
   }
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -3,65 +3,73 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var PointerlockFsWarning = {
 
   _element: null,
   _origin: null,
 
-  init: function() {
+  init() {
     this.Timeout.prototype = {
-      start: function() {
+      start() {
         this.cancel();
         this._id = setTimeout(() => this._handle(), this._delay);
       },
-      cancel: function() {
+      cancel() {
         if (this._id) {
           clearTimeout(this._id);
           this._id = 0;
         }
       },
-      _handle: function() {
+      _handle() {
         this._id = 0;
         this._func();
       },
       get delay() {
         return this._delay;
       }
     };
   },
 
+  /* eslint-disable object-shorthand */
+  /* The object-shorthand rule must be disabled for this constructor
+   * because the ES6 method syntax causes "this.Timeout is not a
+   * constructor" exception. Further, using the {ignoreConstructors: true}
+   * option causes "TypeError: Cannot read property 'charAt' of undefined"
+   * in eslint.
+   */
   /**
    * Timeout object for managing timeout request. If it is started when
    * the previous call hasn't finished, it would automatically cancelled
    * the previous one.
    */
   Timeout: function(func, delay) {
     this._id = 0;
     this._func = func;
     this._delay = delay;
   },
+  /* eslint-enable object-shorthand */
 
-  showPointerLock: function(aOrigin) {
+  showPointerLock(aOrigin) {
     if (!document.fullscreen) {
       let timeout = gPrefService.getIntPref("pointer-lock-api.warning.timeout");
       this.show(aOrigin, "pointerlock-warning", timeout, 0);
     }
   },
 
-  showFullScreen: function(aOrigin) {
+  showFullScreen(aOrigin) {
     let timeout = gPrefService.getIntPref("full-screen-api.warning.timeout");
     let delay = gPrefService.getIntPref("full-screen-api.warning.delay");
     this.show(aOrigin, "fullscreen-warning", timeout, delay);
   },
 
   // Shows a warning that the site has entered fullscreen or
   // pointer lock for a short duration.
-  show: function(aOrigin, elementId, timeout, delay) {
+  show(aOrigin, elementId, timeout, delay) {
 
     if (!this._element) {
       this._element = document.getElementById(elementId);
       // Setup event listeners
       this._element.addEventListener("transitionend", this);
       window.addEventListener("mousemove", this, true);
       // The timeout to hide the warning box after a while.
       this._timeoutHide = new this.Timeout(() => {
@@ -106,17 +114,17 @@ var PointerlockFsWarning = {
 
     // Explicitly set the last state to hidden to avoid the warning
     // box being hidden immediately because of mousemove.
     this._state = "onscreen";
     this._lastState = "hidden";
     this._timeoutHide.start();
   },
 
-  close: function() {
+  close() {
     if (!this._element) {
       return;
     }
     // Cancel any pending timeout
     this._timeoutHide.cancel();
     this._timeoutShow.cancel();
     // Reset state of the warning box
     this._state = "hidden";
@@ -175,17 +183,17 @@ var PointerlockFsWarning = {
               this._element.setAttribute(newState, true);
             }
           });
         });
       }
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
     case "mousemove": {
       let state = this._state;
       if (state == "hidden") {
         // If the warning box is currently hidden, show it after
         // a short delay if the pointer is at the top.
         if (event.clientY != 0) {
           this._timeoutShow.cancel();
@@ -221,22 +229,22 @@ var PointerlockFsWarning = {
       break;
     }
     }
   }
 };
 
 var PointerLock = {
 
-  init: function() {
+  init() {
     window.messageManager.addMessageListener("PointerLock:Entered", this);
     window.messageManager.addMessageListener("PointerLock:Exited", this);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     switch (aMessage.name) {
       case "PointerLock:Entered": {
         PointerlockFsWarning.showPointerLock(aMessage.data.originNoSuffix);
         break;
       }
       case "PointerLock:Exited": {
         PointerlockFsWarning.close();
         break;
@@ -248,41 +256,41 @@ var PointerLock = {
 var FullScreen = {
   _MESSAGES: [
     "DOMFullscreen:Request",
     "DOMFullscreen:NewOrigin",
     "DOMFullscreen:Exit",
     "DOMFullscreen:Painted",
   ],
 
-  init: function() {
+  init() {
     // called when we go into full screen, even if initiated by a web page script
     window.addEventListener("fullscreen", this, true);
     window.addEventListener("MozDOMFullscreen:Entered", this,
                             /* useCapture */ true,
                             /* wantsUntrusted */ false);
     window.addEventListener("MozDOMFullscreen:Exited", this,
                             /* useCapture */ true,
                             /* wantsUntrusted */ false);
     for (let type of this._MESSAGES) {
       window.messageManager.addMessageListener(type, this);
     }
 
     if (window.fullScreen)
       this.toggle();
   },
 
-  uninit: function() {
+  uninit() {
     for (let type of this._MESSAGES) {
       window.messageManager.removeMessageListener(type, this);
     }
     this.cleanup();
   },
 
-  toggle: function() {
+  toggle() {
     var enterFS = window.fullScreen;
 
     // Toggle the View:FullScreen command, which controls elements like the
     // fullscreen menuitem, and menubars.
     let fullscreenCommand = document.getElementById("View:FullScreen");
     if (enterFS) {
       fullscreenCommand.setAttribute("checked", enterFS);
     } else {
@@ -337,21 +345,21 @@ var FullScreen = {
     }
 
     if (enterFS && !document.fullscreenElement) {
       Services.telemetry.getHistogramById("FX_BROWSER_FULLSCREEN_USED")
                         .add(1);
     }
   },
 
-  exitDomFullScreen : function() {
+  exitDomFullScreen() {
     document.exitFullscreen();
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "fullscreen":
         this.toggle();
         break;
       case "MozDOMFullscreen:Entered": {
         // The event target is the element which requested the DOM
         // fullscreen. If we were entering DOM fullscreen for a remote
         // browser, the target would be `gBrowser` and the original
@@ -372,17 +380,17 @@ var FullScreen = {
       }
       case "MozDOMFullscreen:Exited":
         TelemetryStopwatch.start("FULLSCREEN_CHANGE_MS");
         this.cleanupDomFullscreen();
         break;
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let browser = aMessage.target;
     switch (aMessage.name) {
       case "DOMFullscreen:Request": {
         this._windowUtils.remoteFrameFullscreenChanged(browser);
         break;
       }
       case "DOMFullscreen:NewOrigin": {
         // Don't show the warning if we've already exited fullscreen.
@@ -398,17 +406,17 @@ var FullScreen = {
       case "DOMFullscreen:Painted": {
         Services.obs.notifyObservers(window, "fullscreen-painted", "");
         TelemetryStopwatch.finish("FULLSCREEN_CHANGE_MS");
         break;
       }
     }
   },
 
-  enterDomFullscreen : function(aBrowser) {
+  enterDomFullscreen(aBrowser) {
 
     if (!document.fullscreenElement) {
       return;
     }
 
     // If we have a current pointerlock warning shown then hide it
     // before transition.
     PointerlockFsWarning.close();
@@ -451,77 +459,77 @@ var FullScreen = {
     gBrowser.tabContainer.addEventListener("TabSelect", this.exitDomFullScreen);
 
     // Add listener to detect when the fullscreen window is re-focused.
     // If a fullscreen window loses focus, we show a warning when the
     // fullscreen window is refocused.
     window.addEventListener("activate", this);
   },
 
-  cleanup: function() {
+  cleanup() {
     if (!window.fullScreen) {
       MousePosTracker.removeListener(this);
       document.removeEventListener("keypress", this._keyToggleCallback, false);
       document.removeEventListener("popupshown", this._setPopupOpen, false);
       document.removeEventListener("popuphidden", this._setPopupOpen, false);
     }
   },
 
-  cleanupDomFullscreen: function() {
+  cleanupDomFullscreen() {
     window.messageManager
           .broadcastAsyncMessage("DOMFullscreen:CleanUp");
 
     PointerlockFsWarning.close();
     gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen);
     gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen);
     gBrowser.tabContainer.removeEventListener("TabSelect", this.exitDomFullScreen);
     window.removeEventListener("activate", this);
 
     document.documentElement.removeAttribute("inDOMFullscreen");
   },
 
-  _isRemoteBrowser: function(aBrowser) {
+  _isRemoteBrowser(aBrowser) {
     return gMultiProcessBrowser && aBrowser.getAttribute("remote") == "true";
   },
 
   get _windowUtils() {
     return window.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  getMouseTargetRect: function()
+  getMouseTargetRect()
   {
     return this._mouseTargetRect;
   },
 
   // Event callbacks
-  _expandCallback: function()
+  _expandCallback()
   {
     FullScreen.showNavToolbox();
   },
-  onMouseEnter: function()
+  onMouseEnter()
   {
     FullScreen.hideNavToolbox();
   },
-  _keyToggleCallback: function(aEvent)
+  _keyToggleCallback(aEvent)
   {
     // if we can use the keyboard (eg Ctrl+L or Ctrl+E) to open the toolbars, we
     // should provide a way to collapse them too.
     if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
       FullScreen.hideNavToolbox();
     }
     // F6 is another shortcut to the address bar, but its not covered in OpenLocation()
     else if (aEvent.keyCode == aEvent.DOM_VK_F6)
       FullScreen.showNavToolbox();
   },
 
   // Checks whether we are allowed to collapse the chrome
   _isPopupOpen: false,
   _isChromeCollapsed: false,
-  _safeToCollapse: function() {
+  _safeToCollapse() {
     if (!gPrefService.getBoolPref("browser.fullscreen.autohide"))
       return false;
 
     // a popup menu is open in chrome: don't collapse chrome
     if (this._isPopupOpen)
       return false;
 
     // On OS X Lion we don't want to hide toolbars.
@@ -533,17 +541,17 @@ var FullScreen = {
         document.commandDispatcher.focusedElement.ownerDocument == document &&
         document.commandDispatcher.focusedElement.localName == "input") {
       return false;
     }
 
     return true;
   },
 
-  _setPopupOpen: function(aEvent)
+  _setPopupOpen(aEvent)
   {
     // Popups should only veto chrome collapsing if they were opened when the chrome was not collapsed.
     // Otherwise, they would not affect chrome and the user would expect the chrome to go away.
     // e.g. we wouldn't want the autoscroll icon firing this event, so when the user
     // toggles chrome when moving mouse to the top, it doesn't go away again.
     if (aEvent.type == "popupshown" && !FullScreen._isChromeCollapsed &&
         aEvent.target.localName != "tooltip" && aEvent.target.localName != "window")
       FullScreen._isPopupOpen = true;
@@ -551,28 +559,28 @@ var FullScreen = {
              aEvent.target.localName != "window") {
       FullScreen._isPopupOpen = false;
       // Try again to hide toolbar when we close the popup.
       FullScreen.hideNavToolbox(true);
     }
   },
 
   // Autohide helpers for the context menu item
-  getAutohide: function(aItem)
+  getAutohide(aItem)
   {
     aItem.setAttribute("checked", gPrefService.getBoolPref("browser.fullscreen.autohide"));
   },
-  setAutohide: function()
+  setAutohide()
   {
     gPrefService.setBoolPref("browser.fullscreen.autohide", !gPrefService.getBoolPref("browser.fullscreen.autohide"));
     // Try again to hide toolbar when we change the pref.
     FullScreen.hideNavToolbox(true);
   },
 
-  showNavToolbox: function(trackMouse = true) {
+  showNavToolbox(trackMouse = true) {
     this._fullScrToggler.hidden = true;
     gNavToolbox.removeAttribute("fullscreenShouldAnimate");
     gNavToolbox.style.marginTop = "";
 
     if (!this._isChromeCollapsed) {
       return;
     }
 
@@ -586,17 +594,17 @@ var FullScreen = {
         right: rect.right
       };
       MousePosTracker.addListener(this);
     }
 
     this._isChromeCollapsed = false;
   },
 
-  hideNavToolbox: function(aAnimate = false) {
+  hideNavToolbox(aAnimate = false) {
     if (this._isChromeCollapsed || !this._safeToCollapse())
       return;
 
     this._fullScrToggler.hidden = false;
 
     if (aAnimate && gPrefService.getBoolPref("browser.fullscreen.animate")) {
       gNavToolbox.setAttribute("fullscreenShouldAnimate", true);
       // Hide the fullscreen toggler until the transition ends.
@@ -610,17 +618,17 @@ var FullScreen = {
     }
 
     gNavToolbox.style.marginTop =
       -gNavToolbox.getBoundingClientRect().height + "px";
     this._isChromeCollapsed = true;
     MousePosTracker.removeListener(this);
   },
 
-  _updateToolbars: function(aEnterFS) {
+  _updateToolbars(aEnterFS) {
     for (let el of document.querySelectorAll("toolbar[fullscreentoolbar=true]")) {
       if (aEnterFS) {
         // Give the main nav bar and the tab bar the fullscreen context menu,
         // otherwise remove context menu to prevent breakage
         el.setAttribute("saved-context", el.getAttribute("context"));
         if (el.id == "nav-bar" || el.id == "TabsToolbar")
           el.setAttribute("context", "autohide-context");
         else
--- a/browser/base/content/browser-fullZoom.js
+++ b/browser/base/content/browser-fullZoom.js
@@ -84,17 +84,17 @@ var FullZoom = {
         this._ignorePendingZoomAccesses(browser);
         this._applyZoomToPref(browser);
         break;
     }
   },
 
   // nsIObserver
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "nsPref:changed":
         switch (aData) {
           case "browser.zoom.siteSpecific":
             this._siteSpecificPref =
               gPrefService.getBoolPref("browser.zoom.siteSpecific");
             break;
           case "browser.zoom.updateBackgroundTabs":
@@ -149,17 +149,17 @@ var FullZoom = {
                           this._ensureValid(aValue);
 
     // If the current page doesn't have a site-specific preference, then its
     // zoom should be set to the new global preference now that the global
     // preference has changed.
     let hasPref = false;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(browser.currentURI.spec, this.name, ctxt, {
-      handleResult: function() { hasPref = true; },
+      handleResult() { hasPref = true; },
       handleCompletion: function() {
         if (!hasPref && token.isCurrent)
           this._applyPrefToZoom(undefined, browser);
       }.bind(this)
     });
   },
 
   // location change observer
@@ -218,17 +218,17 @@ var FullZoom = {
                             this._notifyOnLocationChange.bind(this, browser));
       return;
     }
 
     // It's not cached, so we have to asynchronously fetch it.
     let value = undefined;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(aURI.spec, this.name, ctxt, {
-      handleResult: function(resultPref) { value = resultPref.value; },
+      handleResult(resultPref) { value = resultPref.value; },
       handleCompletion: function() {
         if (!token.isCurrent) {
           this._notifyOnLocationChange(browser);
           return;
         }
         this._applyPrefToZoom(value, browser,
                               this._notifyOnLocationChange.bind(this, browser));
       }.bind(this)
@@ -264,17 +264,17 @@ var FullZoom = {
     this._ignorePendingZoomAccesses(browser);
     this._applyZoomToPref(browser);
   },
 
   /**
    * Sets the zoom level for the given browser to the given floating
    * point value, where 1 is the default zoom level.
    */
-  setZoom: function(value, browser = gBrowser.selectedBrowser) {
+  setZoom(value, browser = gBrowser.selectedBrowser) {
     ZoomManager.setZoomForBrowser(browser, value);
     this._ignorePendingZoomAccesses(browser);
     this._applyZoomToPref(browser);
   },
 
   /**
    * Sets the zoom level of the page in the given browser to the global zoom
    * level.
@@ -482,17 +482,17 @@ var FullZoom = {
     // * Otherwise, this._globalValue is a number, the global value.
     return new Promise(resolve => {
       if ("_globalValue" in this) {
         resolve(this._globalValue);
         return;
       }
       let value = undefined;
       this._cps2.getGlobal(this.name, this._loadContextFromBrowser(browser), {
-        handleResult: function(pref) { value = pref.value; },
+        handleResult(pref) { value = pref.value; },
         handleCompletion: (reason) => {
           this._globalValue = this._ensureValid(value);
           resolve(this._globalValue);
         }
       });
     });
   },
 
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -83,17 +83,17 @@ var gFxAccounts = {
     return Services.prefs.getBoolPref("services.sync.sendTabToDevice.enabled");
   },
 
   get remoteClients() {
     return Weave.Service.clientsEngine.remoteClients
            .sort((a, b) => a.name.localeCompare(b.name));
   },
 
-  init: function() {
+  init() {
     // Bail out if we're already initialized and for pop-up windows.
     if (this._initialized || !window.toolbar.visible) {
       return;
     }
 
     for (let topic of this.topics) {
       Services.obs.addObserver(this, topic, false);
     }
@@ -102,43 +102,43 @@ var gFxAccounts = {
     gNavToolbox.addEventListener("customizationending", this);
 
     EnsureFxAccountsWebChannel();
     this._initialized = true;
 
     this.updateUI();
   },
 
-  uninit: function() {
+  uninit() {
     if (!this._initialized) {
       return;
     }
 
     for (let topic of this.topics) {
       Services.obs.removeObserver(this, topic);
     }
 
     this._initialized = false;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "fxa-migration:state-changed":
         this.onMigrationStateChanged(data, subject);
         break;
       case this.FxAccountsCommon.ONPROFILE_IMAGE_CHANGE_NOTIFICATION:
         this.updateUI();
         break;
       default:
         this.updateUI();
         break;
     }
   },
 
-  onMigrationStateChanged: function() {
+  onMigrationStateChanged() {
     // Since we nuked most of the migration code, this notification will fire
     // once after legacy Sync has been disconnected (and should never fire
     // again)
     let nb = window.document.getElementById("global-notificationbox");
 
     let msg = this.strings.GetStringFromName("autoDisconnectDescription")
     let signInLabel = this.strings.GetStringFromName("autoDisconnectSignIn.label");
     let signInAccessKey = this.strings.GetStringFromName("autoDisconnectSignIn.accessKey");
@@ -170,36 +170,36 @@ var gFxAccounts = {
                           undefined,
                           nb.PRIORITY_WARNING_LOW,
                           buttons);
 
     // ensure the hamburger menu reflects the newly disconnected state.
     this.updateAppMenuItem();
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     this._inCustomizationMode = event.type == "customizationstarting";
     this.updateAppMenuItem();
   },
 
-  updateUI: function() {
+  updateUI() {
     // It's possible someone signed in to FxA after seeing our notification
     // about "Legacy Sync migration" (which now is actually "Legacy Sync
     // auto-disconnect") so kill that notification if it still exists.
     let nb = window.document.getElementById("global-notificationbox");
     let n = nb.getNotificationWithValue(this.SYNC_MIGRATION_NOTIFICATION_TITLE);
     if (n) {
       nb.removeNotification(n, true);
     }
 
     this.updateAppMenuItem();
   },
 
   // Note that updateAppMenuItem() returns a Promise that's only used by tests.
-  updateAppMenuItem: function() {
+  updateAppMenuItem() {
     let profileInfoEnabled = false;
     try {
       profileInfoEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled");
     } catch (e) { }
 
     // Bail out if FxA is disabled.
     if (!this.weave.fxAccountsEnabled) {
       return Promise.resolve();
@@ -315,17 +315,17 @@ var gFxAccounts = {
       // The most likely scenario is a user logged out, so reflect that.
       // Bug 995134 calls for better errors so we could retry if we were
       // sure this was the failure reason.
       this.FxAccountsCommon.log.error("Error updating FxA account info", error);
       updateWithUserData(null);
     });
   },
 
-  onMenuPanelCommand: function() {
+  onMenuPanelCommand() {
 
     switch (this.panelUIFooter.getAttribute("fxastatus")) {
     case "signedin":
       this.openPreferences();
       break;
     case "error":
       if (this.panelUIFooter.getAttribute("unverified")) {
         this.openPreferences();
@@ -336,45 +336,45 @@ var gFxAccounts = {
     default:
       this.openPreferences();
       break;
     }
 
     PanelUI.hide();
   },
 
-  openPreferences: function() {
+  openPreferences() {
     openPreferences("paneSync", { urlParams: { entrypoint: "menupanel" } });
   },
 
-  openAccountsPage: function(action, urlParams = {}) {
+  openAccountsPage(action, urlParams = {}) {
     let params = new URLSearchParams();
     if (action) {
       params.set("action", action);
     }
     for (let name in urlParams) {
       if (urlParams[name] !== undefined) {
         params.set(name, urlParams[name]);
       }
     }
     let url = "about:accounts?" + params;
     switchToTabHavingURI(url, true, {
       replaceQueryString: true
     });
   },
 
-  openSignInAgainPage: function(entryPoint) {
+  openSignInAgainPage(entryPoint) {
     this.openAccountsPage("reauth", { entrypoint: entryPoint });
   },
 
-  sendTabToDevice: function(url, clientId, title) {
+  sendTabToDevice(url, clientId, title) {
     Weave.Service.clientsEngine.sendURIToClientForDisplay(url, clientId, title);
   },
 
-  populateSendTabToDevicesMenu: function(devicesPopup, url, title) {
+  populateSendTabToDevicesMenu(devicesPopup, url, title) {
     // remove existing menu items
     while (devicesPopup.hasChildNodes()) {
       devicesPopup.removeChild(devicesPopup.firstChild);
     }
 
     const fragment = document.createDocumentFragment();
 
     const onTargetDeviceCommand = (event) => {
@@ -405,27 +405,27 @@ var gFxAccounts = {
       fragment.appendChild(separator);
       const allDevicesLabel = this.strings.GetStringFromName("sendTabToAllDevices.menuitem");
       addTargetDevice("", allDevicesLabel);
     }
 
     devicesPopup.appendChild(fragment);
   },
 
-  updateTabContextMenu: function(aPopupMenu) {
+  updateTabContextMenu(aPopupMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     ["context_sendTabToDevice", "context_sendTabToDevice_separator"]
     .forEach(id => { document.getElementById(id).hidden = !remoteClientPresent });
   },
 
-  initPageContextMenu: function(contextMenu) {
+  initPageContextMenu(contextMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     // showSendLink and showSendPage are mutually exclusive
     const showSendLink = remoteClientPresent
                          && (contextMenu.onSaveableLink || contextMenu.onPlainTextLink);
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -346,25 +346,25 @@ var gGestureSupport = {
 
   /**
    * Handle continual motion events.  This function will be set by
    * _setupGesture or _setupSwipe.
    *
    * @param aEvent
    *        The continual motion update event to handle
    */
-  _doUpdate: function(aEvent) {},
+  _doUpdate(aEvent) {},
 
   /**
    * Handle gesture end events.  This function will be set by _setupSwipe.
    *
    * @param aEvent
    *        The gesture end event to handle
    */
-  _doEnd: function(aEvent) {},
+  _doEnd(aEvent) {},
 
   /**
    * Convert the swipe gesture into a browser action based on the direction.
    *
    * @param aEvent
    *        The swipe event to handle
    */
   onSwipe: function GS_onSwipe(aEvent) {
@@ -439,17 +439,17 @@ var gGestureSupport = {
   },
 
   /**
    * Perform rotation for ImageDocuments
    *
    * @param aEvent
    *        The MozRotateGestureUpdate event triggering this call
    */
-  rotate: function(aEvent) {
+  rotate(aEvent) {
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
     if (!contentElement)
       return;
     // If we're currently snapping, cancel that snap
     if (contentElement.classList.contains("completeRotation"))
@@ -458,17 +458,17 @@ var gGestureSupport = {
     this.rotation = Math.round(this.rotation + aEvent.delta);
     contentElement.style.transform = "rotate(" + this.rotation + "deg)";
     this._lastRotateDelta = aEvent.delta;
   },
 
   /**
    * Perform a rotation end for ImageDocuments
    */
-  rotateEnd: function() {
+  rotateEnd() {
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
     if (!contentElement)
       return;
 
     let transitionRotation = 0;
@@ -526,17 +526,17 @@ var gGestureSupport = {
       this._currentRotation += 360;
     return this._currentRotation;
   },
 
   /**
    * When the location/tab changes, need to reload the current rotation for the
    * image
    */
-  restoreRotationState: function() {
+  restoreRotationState() {
     // Bug 863514 - Make gesture support work in electrolysis
     if (gMultiProcessBrowser)
       return;
 
     if (!(content.document instanceof ImageDocument))
       return;
 
     let contentElement = content.document.body.firstElementChild;
@@ -555,17 +555,17 @@ var gGestureSupport = {
                                    .split(",");
     this.rotation = Math.round(Math.atan2(transformValue[1], transformValue[0]) *
                                (180 / Math.PI));
   },
 
   /**
    * Removes the transition rule by removing the completeRotation class
    */
-  _clearCompleteRotation: function() {
+  _clearCompleteRotation() {
     let contentElement = content.document &&
                          content.document instanceof ImageDocument &&
                          content.document.body &&
                          content.document.body.firstElementChild;
     if (!contentElement)
       return;
     contentElement.classList.remove("completeRotation");
     contentElement.removeEventListener("transitionend", this._clearCompleteRotation);
@@ -726,17 +726,17 @@ var gHistorySwipeAnimation = {
       this._positionBox(this._curBox, 0);
       this._positionBox(this._nextBox, offset + aVal);
     } else {
       this._prevBox.collapsed = true;
       this._positionBox(this._curBox, aVal / dampValue);
     }
   },
 
-  _getCurrentHistoryIndex: function() {
+  _getCurrentHistoryIndex() {
     return SessionStore.getSessionHistory(gBrowser.selectedTab).index;
   },
 
   /**
    * Event handler for events relevant to the history swipe animation.
    *
    * @param aEvent
    *        An event to process.
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -7,52 +7,52 @@ var gEMEHandler = {
   get uiEnabled() {
     let emeUIEnabled = Services.prefs.getBoolPref("browser.eme.ui.enabled");
     // Force-disable on WinXP:
     if (navigator.platform.toLowerCase().startsWith("win")) {
       emeUIEnabled = emeUIEnabled && parseFloat(Services.sysinfo.get("version")) >= 6;
     }
     return emeUIEnabled;
   },
-  ensureEMEEnabled: function(browser, keySystem) {
+  ensureEMEEnabled(browser, keySystem) {
     Services.prefs.setBoolPref("media.eme.enabled", true);
     if (keySystem) {
       if (keySystem.startsWith("com.adobe") &&
           Services.prefs.getPrefType("media.gmp-eme-adobe.enabled") &&
           !Services.prefs.getBoolPref("media.gmp-eme-adobe.enabled")) {
         Services.prefs.setBoolPref("media.gmp-eme-adobe.enabled", true);
       } else if (keySystem == "com.widevine.alpha" &&
                  Services.prefs.getPrefType("media.gmp-widevinecdm.enabled") &&
                  !Services.prefs.getBoolPref("media.gmp-widevinecdm.enabled")) {
         Services.prefs.setBoolPref("media.gmp-widevinecdm.enabled", true);
       }
     }
     browser.reload();
   },
-  isKeySystemVisible: function(keySystem) {
+  isKeySystemVisible(keySystem) {
     if (!keySystem) {
       return false;
     }
     if (keySystem.startsWith("com.adobe") &&
         Services.prefs.getPrefType("media.gmp-eme-adobe.visible")) {
       return Services.prefs.getBoolPref("media.gmp-eme-adobe.visible");
     }
     if (keySystem == "com.widevine.alpha" &&
         Services.prefs.getPrefType("media.gmp-widevinecdm.visible")) {
       return Services.prefs.getBoolPref("media.gmp-widevinecdm.visible");
     }
     return true;
   },
-  getLearnMoreLink: function(msgId) {
+  getLearnMoreLink(msgId) {
     let text = gNavigatorBundle.getString("emeNotifications." + msgId + ".learnMoreLabel");
     let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
     return "<label class='text-link' href='" + baseURL + "drm-content'>" +
            text + "</label>";
   },
-  receiveMessage: function({target: browser, data: data}) {
+  receiveMessage({target: browser, data: data}) {
     let parsedData;
     try {
       parsedData = JSON.parse(data);
     } catch (ex) {
       Cu.reportError("Malformed EME video message with data: " + data);
       return;
     }
     let {status: status, keySystem: keySystem} = parsedData;
@@ -97,17 +97,17 @@ var gEMEHandler = {
         return;
       default:
         Cu.reportError(new Error("Unknown message ('" + status + "') dealing with EME key request: " + data));
         return;
     }
 
     this.showNotificationBar(browser, notificationId, keySystem, params, buttonCallback);
   },
-  showNotificationBar: function(browser, notificationId, keySystem, labelParams, callback) {
+  showNotificationBar(browser, notificationId, keySystem, labelParams, callback) {
     let box = gBrowser.getNotificationBox(browser);
     if (box.getNotificationWithValue(notificationId)) {
       return;
     }
 
     let msgPrefix = "emeNotifications." + notificationId + ".";
     let msgId = msgPrefix + "message";
 
@@ -117,34 +117,34 @@ var gEMEHandler = {
 
     let buttons = [];
     if (callback) {
       let btnLabelId = msgPrefix + "button.label";
       let btnAccessKeyId = msgPrefix + "button.accesskey";
       buttons.push({
         label: gNavigatorBundle.getString(btnLabelId),
         accessKey: gNavigatorBundle.getString(btnAccessKeyId),
-        callback: callback
+        callback
       });
     }
 
     let iconURL = "chrome://browser/skin/drm-icon.svg#chains-black";
 
     // Do a little dance to get rich content into the notification:
     let fragment = document.createDocumentFragment();
     let descriptionContainer = document.createElement("description");
     descriptionContainer.innerHTML = message;
     while (descriptionContainer.childNodes.length) {
       fragment.appendChild(descriptionContainer.childNodes[0]);
     }
 
     box.appendNotification(fragment, notificationId, iconURL, box.PRIORITY_WARNING_MEDIUM,
                            buttons);
   },
-  showPopupNotificationForSuccess: function(browser, keySystem) {
+  showPopupNotificationForSuccess(browser, keySystem) {
     // We're playing EME content! Remove any "we can't play because..." messages.
     var box = gBrowser.getNotificationBox(browser);
     ["drmContentDisabled",
      "drmContentCDMInstalling"
      ].forEach(function(value) {
         var notification = box.getNotificationWithValue(value);
         if (notification)
           box.removeNotification(notification);
@@ -169,17 +169,17 @@ var gEMEHandler = {
       Services.prefs.setBoolPref(firstPlayPref, true);
     } else {
       document.getElementById(anchorId).removeAttribute("firstplay");
     }
 
     let mainAction = {
       label: gNavigatorBundle.getString(btnLabelId),
       accessKey: gNavigatorBundle.getString(btnAccessKeyId),
-      callback: function() { openPreferences("paneContent"); },
+      callback() { openPreferences("paneContent"); },
       dismiss: true
     };
     let options = {
       dismissed: true,
       eventCallback: aTopic => aTopic == "swapping",
       learnMoreURL: Services.urlFormatter.formatURLPref("app.support.baseURL") + "drm-content",
     };
     PopupNotifications.show(browser, "drmContentPlaying", message, anchorId, mainAction, null, options);
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -4,17 +4,17 @@
 
 var StarUI = {
   _itemId: -1,
   uri: null,
   _batching: false,
   _isNewBookmark: false,
   _autoCloseTimer: 0,
 
-  _element: function(aID) {
+  _element(aID) {
     return document.getElementById(aID);
   },
 
   // Edit-bookmark panel
   get panel() {
     delete this.panel;
     var element = this._element("editBookmarkPanel");
     // initially the panel is hidden
@@ -628,20 +628,20 @@ var PlacesCommandHook = {
     let title = feedTitle || gBrowser.contentTitle;
     let description = feedSubtitle;
     if (!description) {
       description = (yield this._getPageDetails(gBrowser.selectedBrowser)).description;
     }
 
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "livemark"
-                                     , feedURI: feedURI
+                                     , feedURI
                                      , siteURI: gBrowser.currentURI
-                                     , title: title
-                                     , description: description
+                                     , title
+                                     , description
                                      , defaultInsertionPoint: toolbarIP
                                      , hiddenRows: [ "feedLocation"
                                                    , "siteLocation"
                                                    , "description" ]
                                      }, window);
   }),
 
   /**
@@ -1138,56 +1138,56 @@ var PlacesToolbarHelper = {
 
   _getShouldWrap: function PTH_getShouldWrap() {
     let placement = CustomizableUI.getPlacementOfWidget("personal-bookmarks");
     let area = placement && placement.area;
     let areaType = area && CustomizableUI.getAreaType(area);
     return !area || CustomizableUI.TYPE_MENU_PANEL == areaType;
   },
 
-  onPlaceholderCommand: function() {
+  onPlaceholderCommand() {
     let widgetGroup = CustomizableUI.getWidget("personal-bookmarks");
     let widget = widgetGroup.forWindow(window);
     if (widget.overflowed ||
         widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
       PlacesCommandHook.showPlacesOrganizer("BookmarksToolbar");
     }
   },
 
-  _getParentToolbar: function(element) {
+  _getParentToolbar(element) {
     while (element) {
       if (element.localName == "toolbar") {
         return element;
       }
       element = element.parentNode;
     }
     return null;
   },
 
-  onWidgetUnderflow: function(aNode, aContainer) {
+  onWidgetUnderflow(aNode, aContainer) {
     // The view gets broken by being removed and reinserted by the overflowable
     // toolbar, so we have to force an uninit and reinit.
     let win = aNode.ownerGlobal;
     if (aNode.id == "personal-bookmarks" && win == window) {
       this._resetView();
     }
   },
 
-  onWidgetAdded: function(aWidgetId, aArea, aPosition) {
+  onWidgetAdded(aWidgetId, aArea, aPosition) {
     if (aWidgetId == "personal-bookmarks" && !this._isCustomizing) {
       // It's possible (with the "Add to Menu", "Add to Toolbar" context
       // options) that the Places Toolbar Items have been moved without
       // letting us prepare and handle it with with customizeStart and
       // customizeDone. If that's the case, we need to reset the views
       // since they're probably broken from the DOM reparenting.
       this._resetView();
     }
   },
 
-  _resetView: function() {
+  _resetView() {
     if (this._viewElt) {
       // It's possible that the placesView might not exist, and we need to
       // do a full init. This could happen if the Bookmarks Toolbar Items are
       // moved to the Menu Panel, and then to the toolbar with the "Add to Toolbar"
       // context menu option, outside of customize mode.
       if (this._viewElt._placesView) {
         this._viewElt._placesView.uninit();
       }
@@ -1269,30 +1269,30 @@ var BookmarkingUI = {
 
   get _unstarredTooltip()
   {
     delete this._unstarredTooltip;
     return this._unstarredTooltip =
       this._getFormattedTooltip("starButtonOff.tooltip2");
   },
 
-  _getFormattedTooltip: function(strId) {
+  _getFormattedTooltip(strId) {
     let args = [];
     let shortcut = document.getElementById(this.BOOKMARK_BUTTON_SHORTCUT);
     if (shortcut)
       args.push(ShortcutUtils.prettifyShortcut(shortcut));
     return gNavigatorBundle.getFormattedString(strId, args);
   },
 
   /**
    * The type of the area in which the button is currently located.
    * When in the panel, we don't update the button's icon.
    */
   _currentAreaType: null,
-  _shouldUpdateStarState: function() {
+  _shouldUpdateStarState() {
     return this._currentAreaType == CustomizableUI.TYPE_TOOLBAR;
   },
 
   /**
    * The popup contents must be updated when the user customizes the UI, or
    * changes the personal toolbar collapsed status.  In such a case, any needed
    * change should be handled in the popupshowing helper, for performance
    * reasons.
@@ -1344,17 +1344,17 @@ var BookmarkingUI = {
     if (viewToolbarMenuitem) {
       // Update View bookmarks toolbar checkbox menuitem.
       viewToolbarMenuitem.classList.add("subviewbutton");
       let personalToolbar = document.getElementById("PersonalToolbar");
       viewToolbarMenuitem.setAttribute("checked", !personalToolbar.collapsed);
     }
   },
 
-  attachPlacesView: function(event, node) {
+  attachPlacesView(event, node) {
     // If the view is already there, bail out early.
     if (node.parentNode._placesView)
       return;
 
     new PlacesMenu(event, "place:folder=BOOKMARKS_MENU", {
       extraClasses: {
         entry: "subviewbutton",
         footer: "panel-subview-footer"
@@ -1572,17 +1572,17 @@ var BookmarkingUI = {
 
   onCustomizeEnd: function BUI_customizeEnd(aWindow) {
     if (aWindow == window) {
       this._isCustomizing = false;
       this.onToolbarVisibilityChange();
     }
   },
 
-  init: function() {
+  init() {
     CustomizableUI.addListener(this);
     this._updateCustomizationState();
   },
 
   _hasBookmarksObserver: false,
   _itemIds: [],
   uninit: function BUI_uninit() {
     this._updateBookmarkPageMenuItem(true);
@@ -1752,17 +1752,17 @@ var BookmarkingUI = {
       this.dropmarkerNotifier.removeAttribute("notification");
       this.button.removeAttribute("notification");
 
       this.dropmarkerNotifier.style.transform = '';
       this.notifier.style.transform = '';
     }, 1000);
   },
 
-  _showSubview: function() {
+  _showSubview() {
     let view = document.getElementById("PanelUI-bookmarks");
     view.addEventListener("ViewShowing", this);
     view.addEventListener("ViewHiding", this);
     let anchor = document.getElementById(this.BOOKMARK_BUTTON_ID);
     anchor.setAttribute("closemenu", "none");
     PanelUI.showSubView("PanelUI-bookmarks", anchor,
                         CustomizableUI.AREA_PANEL);
   },
@@ -1897,51 +1897,51 @@ var BookmarkingUI = {
         // Only need to update the UI if it wasn't marked as starred before:
         if (this._itemIds.length == 1) {
           this._updateStar();
         }
       }
     }
   },
 
-  onBeginUpdateBatch: function() {},
-  onEndUpdateBatch: function() {},
-  onBeforeItemRemoved: function() {},
-  onItemVisited: function() {},
-  onItemMoved: function() {},
+  onBeginUpdateBatch() {},
+  onEndUpdateBatch() {},
+  onBeforeItemRemoved() {},
+  onItemVisited() {},
+  onItemMoved() {},
 
   // CustomizableUI events:
   _starButtonLabel: null,
   get _starButtonOverflowedLabel() {
     delete this._starButtonOverflowedLabel;
     return this._starButtonOverflowedLabel =
       gNavigatorBundle.getString("starButtonOverflowed.label");
   },
   get _starButtonOverflowedStarredLabel() {
     delete this._starButtonOverflowedStarredLabel;
     return this._starButtonOverflowedStarredLabel =
       gNavigatorBundle.getString("starButtonOverflowedStarred.label");
   },
-  onWidgetOverflow: function(aNode, aContainer) {
+  onWidgetOverflow(aNode, aContainer) {
     let win = aNode.ownerGlobal;
     if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window)
       return;
 
     let currentLabel = aNode.getAttribute("label");
     if (!this._starButtonLabel)
       this._starButtonLabel = currentLabel;
 
     if (currentLabel == this._starButtonLabel) {
       let desiredLabel = this._itemIds.length > 0 ? this._starButtonOverflowedStarredLabel
                                                  : this._starButtonOverflowedLabel;
       aNode.setAttribute("label", desiredLabel);
     }
   },
 
-  onWidgetUnderflow: function(aNode, aContainer) {
+  onWidgetUnderflow(aNode, aContainer) {
     let win = aNode.ownerGlobal;
     if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window)
       return;
 
     // The view gets broken by being removed and reinserted. Uninit
     // here so popupshowing will generate a new one:
     this._uninitView();
 
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -12,39 +12,39 @@ var gPluginHandler = {
     "PluginContent:UpdateHiddenPluginUI",
     "PluginContent:HideNotificationBar",
     "PluginContent:InstallSinglePlugin",
     "PluginContent:ShowPluginCrashedNotification",
     "PluginContent:SubmitReport",
     "PluginContent:LinkClickCallback",
   ],
 
-  init: function() {
+  init() {
     const mm = window.messageManager;
     for (let msg of this.MESSAGES) {
       mm.addMessageListener(msg, this);
     }
     window.addEventListener("unload", this);
   },
 
-  uninit: function() {
+  uninit() {
     const mm = window.messageManager;
     for (let msg of this.MESSAGES) {
       mm.removeMessageListener(msg, this);
     }
     window.removeEventListener("unload", this);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "unload") {
       this.uninit();
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "PluginContent:ShowClickToPlayNotification":
         this.showClickToPlayNotification(msg.target, msg.data.plugins, msg.data.showNow,
                                          msg.principal, msg.data.location);
         break;
       case "PluginContent:RemoveNotification":
         this.removeNotification(msg.target, msg.data.name);
         break;
@@ -78,45 +78,45 @@ var gPluginHandler = {
         break;
       default:
         Cu.reportError("gPluginHandler did not expect to handle message " + msg.name);
         break;
     }
   },
 
   // Callback for user clicking on a disabled plugin
-  managePlugins: function() {
+  managePlugins() {
     BrowserOpenAddonsMgr("addons://list/plugin");
   },
 
   // Callback for user clicking on the link in a click-to-play plugin
   // (where the plugin has an update)
-  openPluginUpdatePage: function(pluginTag) {
+  openPluginUpdatePage(pluginTag) {
     let url = Services.blocklist.getPluginInfoURL(pluginTag);
     if (!url) {
       url = Services.blocklist.getPluginBlocklistURL(pluginTag);
     }
     openUILinkIn(url, "tab");
   },
 
   submitReport: function submitReport(runID, keyVals, submitURLOptIn) {
     if (!AppConstants.MOZ_CRASHREPORTER) {
       return;
     }
     Services.prefs.setBoolPref("dom.ipc.plugins.reportCrashURL", submitURLOptIn);
     PluginCrashReporter.submitCrashReport(runID, keyVals);
   },
 
   // Callback for user clicking a "reload page" link
-  reloadPage: function(browser) {
+  reloadPage(browser) {
     browser.reload();
   },
 
   // Callback for user clicking the help icon
-  openHelpPage: function() {
+  openHelpPage() {
     openHelpLink("plugin-crashed", false);
   },
 
   _clickToPlayNotificationEventCallback: function PH_ctpEventCallback(event) {
     if (event == "showing") {
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_SHOWN")
         .add(!this.options.primaryPlugin);
       // Histograms always start at 0, even though our data starts at 1
@@ -134,17 +134,17 @@ var gPluginHandler = {
     }
   },
 
   /**
    * Called from the plugin doorhanger to set the new permissions for a plugin
    * and activate plugins if necessary.
    * aNewState should be either "allownow" "allowalways" or "block"
    */
-  _updatePluginPermission: function(aNotification, aPluginInfo, aNewState) {
+  _updatePluginPermission(aNotification, aPluginInfo, aNewState) {
     let permission;
     let expireType;
     let expireTime;
     let histogram =
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_USER_ACTION");
 
     // Update the permission manager.
     // Also update the current state of pluginInfo.fallbackType so that
@@ -203,17 +203,17 @@ var gPluginHandler = {
     }
 
     browser.messageManager.sendAsyncMessage("BrowserPlugins:ActivatePlugins", {
       pluginInfo: aPluginInfo,
       newState: aNewState,
     });
   },
 
-  showClickToPlayNotification: function(browser, plugins, showNow,
+  showClickToPlayNotification(browser, plugins, showNow,
                                         principal, location) {
     // It is possible that we've received a message from the frame script to show
     // a click to play notification for a principal that no longer matches the one
     // that the browser's content now has assigned (ie, the browser has browsed away
     // after the message was sent, but before the message was received). In that case,
     // we should just ignore the message.
     if (!principal.equals(browser.contentPrincipal)) {
       return;
@@ -276,39 +276,39 @@ var gPluginHandler = {
       return;
     }
 
     let options = {
       dismissed: !showNow,
       persistent: showNow,
       eventCallback: this._clickToPlayNotificationEventCallback,
       primaryPlugin: primaryPluginPermission,
-      pluginData: pluginData,
-      principal: principal,
+      pluginData,
+      principal,
     };
     PopupNotifications.show(browser, "click-to-play-plugins",
                             "", "plugins-notification-icon",
                             null, null, options);
     browser.messageManager.sendAsyncMessage("BrowserPlugins:NotificationShown");
   },
 
-  removeNotification: function(browser, name) {
+  removeNotification(browser, name) {
     let notification = PopupNotifications.getNotification(name, browser);
     if (notification)
       PopupNotifications.remove(notification);
   },
 
-  hideNotificationBar: function(browser, name) {
+  hideNotificationBar(browser, name) {
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue(name);
     if (notification)
       notificationBox.removeNotification(notification, true);
   },
 
-  updateHiddenPluginUI: function(browser, haveInsecure, actions,
+  updateHiddenPluginUI(browser, haveInsecure, actions,
                                  principal, location) {
     let origin = principal.originNoSuffix;
 
     // It is possible that we've received a message from the frame script to show
     // the hidden plugin notification for a principal that no longer matches the one
     // that the browser's content now has assigned (ie, the browser has browsed away
     // after the message was sent, but before the message was received). In that case,
     // we should just ignore the message.
@@ -386,29 +386,29 @@ var gPluginHandler = {
         message = gNavigatorBundle.getFormattedString(
           "pluginActivateMultiple.message", [origin]);
       }
 
       let buttons = [
         {
           label: gNavigatorBundle.getString("pluginContinueBlocking.label"),
           accessKey: gNavigatorBundle.getString("pluginContinueBlocking.accesskey"),
-          callback: function() {
+          callback() {
             Services.telemetry.getHistogramById("PLUGINS_INFOBAR_BLOCK").
               add(true);
 
             Services.perms.addFromPrincipal(principal,
                                             "plugin-hidden-notification",
                                             Services.perms.DENY_ACTION);
           }
         },
         {
           label: gNavigatorBundle.getString("pluginActivateTrigger.label"),
           accessKey: gNavigatorBundle.getString("pluginActivateTrigger.accesskey"),
-          callback: function() {
+          callback() {
             Services.telemetry.getHistogramById("PLUGINS_INFOBAR_ALLOW").
               add(true);
 
             let curNotification =
               PopupNotifications.getNotification("click-to-play-plugins",
                                                  browser);
             if (curNotification) {
               curNotification.reshow();
@@ -432,24 +432,24 @@ var gPluginHandler = {
       if (notificationPermission == Ci.nsIPermissionManager.DENY_ACTION) {
         hideNotification();
       } else {
         showNotification();
       }
     }
   },
 
-  contextMenuCommand: function(browser, plugin, command) {
+  contextMenuCommand(browser, plugin, command) {
     browser.messageManager.sendAsyncMessage("BrowserPlugins:ContextMenuCommand",
-      { command: command }, { plugin: plugin });
+      { command }, { plugin });
   },
 
   // Crashed-plugin observer. Notified once per plugin crash, before events
   // are dispatched to individual plugin instances.
-  NPAPIPluginCrashed : function(subject, topic, data) {
+  NPAPIPluginCrashed(subject, topic, data) {
     let propertyBag = subject;
     if (!(propertyBag instanceof Ci.nsIPropertyBag2) ||
         !(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
         !propertyBag.hasKey("runID") ||
         !propertyBag.hasKey("pluginName")) {
       Cu.reportError("A NPAPI plugin crashed, but the properties of this plugin " +
                      "cannot be read.");
       return;
@@ -488,17 +488,17 @@ var gPluginHandler = {
    *        The browser to show the notification for.
    * @param messageString
    *        The string to put in the notification bar
    * @param pluginID
    *        The unique-per-process identifier for the NPAPI plugin or GMP.
    *        For a GMP, this is the pluginID. For NPAPI plugins (where "pluginID"
    *        means something different), this is the runID.
    */
-  showPluginCrashedNotification: function(browser, messageString, pluginID) {
+  showPluginCrashedNotification(browser, messageString, pluginID) {
     // If there's already an existing notification bar, don't do anything.
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue("plugin-crashed");
     if (notification) {
       return;
     }
 
     // Configure the notification bar
@@ -506,17 +506,17 @@ var gPluginHandler = {
     let iconURL = "chrome://mozapps/skin/plugins/notifyPluginCrashed.png";
     let reloadLabel = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.label");
     let reloadKey   = gNavigatorBundle.getString("crashedpluginsMessage.reloadButton.accesskey");
 
     let buttons = [{
       label: reloadLabel,
       accessKey: reloadKey,
       popup: null,
-      callback: function() { browser.reload(); },
+      callback() { browser.reload(); },
     }];
 
     if (AppConstants.MOZ_CRASHREPORTER &&
         PluginCrashReporter.hasCrashReport(pluginID)) {
       let submitLabel = gNavigatorBundle.getString("crashedpluginsMessage.submitButton.label");
       let submitKey   = gNavigatorBundle.getString("crashedpluginsMessage.submitButton.accesskey");
       let submitButton = {
         label: submitLabel,
--- a/browser/base/content/browser-refreshblocker.js
+++ b/browser/base/content/browser-refreshblocker.js
@@ -12,17 +12,17 @@ var RefreshBlocker = {
   init() {
     gBrowser.addEventListener("RefreshBlocked", this);
   },
 
   uninit() {
     gBrowser.removeEventListener("RefreshBlocked", this);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "RefreshBlocked") {
       this.block(event.originalTarget, event.detail);
     }
   },
 
   /**
    * Shows the blocked refresh / redirect notification for some browser.
    *
@@ -63,17 +63,17 @@ var RefreshBlocker = {
       let refreshButtonText =
         gNavigatorBundle.getString("refreshBlocked.goButton");
       let refreshButtonAccesskey =
         gNavigatorBundle.getString("refreshBlocked.goButton.accesskey");
 
       let buttons = [{
         label: refreshButtonText,
         accessKey: refreshButtonAccesskey,
-        callback: function() {
+        callback() {
           if (browser.messageManager) {
             browser.messageManager.sendAsyncMessage("RefreshBlocker:Refresh", data);
           }
         }
       }];
 
       notificationBox.appendNotification(message, "refresh-blocked",
                                          "chrome://browser/skin/Info.png",
--- a/browser/base/content/browser-safebrowsing.js
+++ b/browser/base/content/browser-safebrowsing.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var gSafeBrowsing = {
 
-  setReportPhishingMenu: function() {
+  setReportPhishingMenu() {
     // In order to detect whether or not we're at the phishing warning
     // page, we have to check the documentURI instead of the currentURI.
     // This is because when the DocShell loads an error page, the
     // currentURI stays at the original target, while the documentURI
     // will point to the internal error page we loaded instead.
     var docURI = gBrowser.selectedBrowser.documentURI;
     var isPhishingPage =
       docURI && docURI.spec.startsWith("about:blocked?e=deceptiveBlocked");
@@ -37,12 +37,12 @@ var gSafeBrowsing = {
       broadcaster.setAttribute("disabled", true);
   },
 
   /**
    * Used to report a phishing page or a false positive
    * @param name String One of "Phish", "Error", "Malware" or "MalwareError"
    * @return String the report phishing URL.
    */
-  getReportURL: function(name) {
+  getReportURL(name) {
     return SafeBrowsing.getReportURL(name, gBrowser.currentURI);
   }
 }
--- a/browser/base/content/browser-sidebar.js
+++ b/browser/base/content/browser-sidebar.js
@@ -253,17 +253,17 @@ var SidebarUI = {
       } else {
         // Older code handled this case, so we do it too.
         this._fireFocusedEvent();
         resolve();
       }
 
       let selBrowser = gBrowser.selectedBrowser;
       selBrowser.messageManager.sendAsyncMessage("Sidebar:VisibilityChange",
-        {commandID: commandID, isOpen: true}
+        {commandID, isOpen: true}
       );
       BrowserUITelemetry.countSidebarEvent(commandID, "show");
     });
   },
 
   /**
    * Hide the sidebar.
    */
@@ -291,17 +291,17 @@ var SidebarUI = {
     this._box.setAttribute("sidebarcommand", "");
     this._title.value = "";
     this._box.hidden = true;
     this._splitter.hidden = true;
 
     let selBrowser = gBrowser.selectedBrowser;
     selBrowser.focus();
     selBrowser.messageManager.sendAsyncMessage("Sidebar:VisibilityChange",
-      {commandID: commandID, isOpen: false}
+      {commandID, isOpen: false}
     );
     BrowserUITelemetry.countSidebarEvent(commandID, "hide");
   },
 };
 
 /**
  * This exists for backards compatibility - it will be called once a sidebar is
  * ready, following any request to show it.
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -34,17 +34,17 @@ var gSyncUI = {
   ],
 
   _unloaded: false,
   // The last sync start time. Used to calculate the leftover animation time
   // once syncing completes (bug 1239042).
   _syncStartTime: 0,
   _syncAnimationTimer: 0,
 
-  init: function() {
+  init() {
     Cu.import("resource://services-common/stringbundle.js");
 
     // Proceed to set up the UI if Sync has already started up.
     // Otherwise we'll do it when Sync is firing up.
     if (this.weaveService.ready) {
       this.initUI();
       return;
     }
@@ -132,17 +132,17 @@ var gSyncUI = {
     // Otherwise we are configured for legacy Sync, which has no verification
     // concept.
     return Promise.resolve(false);
   },
 
   // Note that we don't show login errors in a notification bar here, but do
   // still need to track a login-failed state so the "Tools" menu updates
   // with the correct state.
-  _loginFailed: function() {
+  _loginFailed() {
     // If Sync isn't already ready, we don't want to force it to initialize
     // by referencing Weave.Status - and it isn't going to be accurate before
     // Sync is ready anyway.
     if (!this.weaveService.ready) {
       this.log.debug("_loginFailed has sync not ready, so returning false");
       return false;
     }
     this.log.debug("_loginFailed has sync state=${sync}",
@@ -237,17 +237,17 @@ var gSyncUI = {
     // the hamburger menu.
     this.updateUI();
   },
 
   onLogout: function SUI_onLogout() {
     this.updateUI();
   },
 
-  _getAppName: function() {
+  _getAppName() {
     let brand = new StringBundle("chrome://branding/locale/brand.properties");
     return brand.get("brandShortName");
   },
 
   // Commands
   // doSync forces a sync - it *does not* return a promise as it is called
   // via the various UI components.
   doSync() {
@@ -299,33 +299,33 @@ var gSyncUI = {
         window.openDialog("chrome://browser/content/sync/setup.xul",
                           "weaveSetup", "centerscreen,chrome,resizable=no",
                           wizardType);
       }
     }
   },
 
   // Open the legacy-sync device pairing UI. Note used for FxA Sync.
-  openAddDevice: function() {
+  openAddDevice() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
 
     let win = Services.wm.getMostRecentWindow("Sync:AddDevice");
     if (win)
       win.focus();
     else
       window.openDialog("chrome://browser/content/sync/addDevice.xul",
                         "syncAddDevice", "centerscreen,chrome,resizable=no");
   },
 
-  openPrefs: function(entryPoint) {
+  openPrefs(entryPoint) {
     openPreferences("paneSync", { urlParams: { entrypoint: entryPoint } });
   },
 
-  openSignInAgainPage: function(entryPoint = "syncbutton") {
+  openSignInAgainPage(entryPoint = "syncbutton") {
     gFxAccounts.openSignInAgainPage(entryPoint);
   },
 
   openSyncedTabsPanel() {
     let placement = CustomizableUI.getPlacementOfWidget("sync-button");
     let area = placement ? placement.area : CustomizableUI.AREA_NAVBAR;
     let anchor = document.getElementById("sync-button") ||
                  document.getElementById("PanelUI-menu-button");
@@ -418,17 +418,17 @@ var gSyncUI = {
       if (tooltiptext) {
         broadcaster.setAttribute("tooltiptext", tooltiptext);
       } else {
         broadcaster.removeAttribute("tooltiptext");
       }
     }
   }),
 
-  formatLastSyncDate: function(date) {
+  formatLastSyncDate(date) {
     let dateFormat;
     let sixDaysAgo = (() => {
       let tempDate = new Date();
       tempDate.setDate(tempDate.getDate() - 6);
       tempDate.setHours(0, 0, 0, 0);
       return tempDate;
     })();
     // It may be confusing for the user to see "Last Sync: Monday" when the last sync was a indeed a Monday but 3 weeks ago
@@ -436,17 +436,17 @@ var gSyncUI = {
       dateFormat = {month: 'long', day: 'numeric'};
     } else {
       dateFormat = {weekday: 'long', hour: 'numeric', minute: 'numeric'};
     }
     let lastSyncDateString = date.toLocaleDateString(undefined, dateFormat);
     return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1);
   },
 
-  onClientsSynced: function() {
+  onClientsSynced() {
     let broadcaster = document.getElementById("sync-syncnow-state");
     if (broadcaster) {
       if (Weave.Service.clientsEngine.stats.numClients > 1) {
         broadcaster.setAttribute("devices-status", "multi");
       } else {
         broadcaster.setAttribute("devices-status", "single");
       }
     }
--- a/browser/base/content/browser-tabsintitlebar-stub.js
+++ b/browser/base/content/browser-tabsintitlebar-stub.js
@@ -2,16 +2,16 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // This file is used as a stub object for platforms which
 // don't have CAN_DRAW_IN_TITLEBAR defined.
 
 var TabsInTitlebar = {
-  init: function() {},
-  uninit: function() {},
-  allowedBy: function(condition, allow) {},
+  init() {},
+  uninit() {},
+  allowedBy(condition, allow) {},
   updateAppearance: function updateAppearance(aForce) {},
   get enabled() {
     return document.documentElement.getAttribute("tabsintitlebar") == "true";
   },
 };
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -2,17 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Note: the file browser-tabsintitlebar-stub.js is used instead of
 // this one on platforms which don't have CAN_DRAW_IN_TITLEBAR defined.
 
 var TabsInTitlebar = {
-  init: function() {
+  init() {
     if (this._initialized) {
       return;
     }
     this._readPref();
     Services.prefs.addObserver(this._prefName, this, false);
 
     // We need to update the appearance of the titlebar when the menu changes
     // from the active to the inactive state. We can't, however, rely on
@@ -44,17 +44,17 @@ var TabsInTitlebar = {
     if (this._updateOnInit) {
       // We don't need to call this with 'true', even if original calls
       // (before init()) did, because this will be the first call and so
       // we will update anyway.
       this._update();
     }
   },
 
-  allowedBy: function(condition, allow) {
+  allowedBy(condition, allow) {
     if (allow) {
       if (condition in this._disallowed) {
         delete this._disallowed[condition];
         this._update(true);
       }
     } else if (!(condition in this._disallowed)) {
       this._disallowed[condition] = null;
       this._update(true);
@@ -64,49 +64,49 @@ var TabsInTitlebar = {
   updateAppearance: function updateAppearance(aForce) {
     this._update(aForce);
   },
 
   get enabled() {
     return document.documentElement.getAttribute("tabsintitlebar") == "true";
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     if (topic == "nsPref:changed")
       this._readPref();
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (aEvent.type == "resolutionchange" && aEvent.target == window) {
       this._update(true);
     }
   },
 
-  _onMenuMutate: function(aMutations) {
+  _onMenuMutate(aMutations) {
     for (let mutation of aMutations) {
       if (mutation.attributeName == "inactive" ||
           mutation.attributeName == "autohide") {
         TabsInTitlebar._update(true);
         return;
       }
     }
   },
 
   _initialized: false,
   _updateOnInit: false,
   _disallowed: {},
   _prefName: "browser.tabs.drawInTitlebar",
   _lastSizeMode: null,
 
-  _readPref: function() {
+  _readPref() {
     this.allowedBy("pref",
                    Services.prefs.getBoolPref(this._prefName));
   },
 
-  _update: function(aForce = false) {
+  _update(aForce = false) {
     let $ = id => document.getElementById(id);
     let rect = ele => ele.getBoundingClientRect();
     let verticalMargins = cstyle => parseFloat(cstyle.marginBottom) + parseFloat(cstyle.marginTop);
 
     if (window.fullScreen)
       return;
 
     // In some edgecases it is possible for this to fire before we've initialized.
@@ -248,22 +248,22 @@ var TabsInTitlebar = {
     }
 
     ToolbarIconColor.inferFromText();
     if (CustomizationHandler.isCustomizing()) {
       gCustomizeMode.updateLWTStyling();
     }
   },
 
-  _sizePlaceholder: function(type, width) {
+  _sizePlaceholder(type, width) {
     Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='" + type + "']"),
                   function(node) { node.width = width; });
   },
 
-  uninit: function() {
+  uninit() {
     this._initialized = false;
     removeEventListener("resolutionchange", this);
     Services.prefs.removeObserver(this._prefName, this);
     this._menuObserver.disconnect();
     CustomizableUI.removeListener(this);
   }
 };
 
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -165,20 +165,20 @@ XPCOMUtils.defineLazyGetter(this, "Win7F
   if (AppConstants.platform != "win")
     return null;
 
   const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
   if (WINTASKBAR_CONTRACTID in Cc &&
       Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
     let AeroPeek = Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", {}).AeroPeek;
     return {
-      onOpenWindow: function() {
+      onOpenWindow() {
         AeroPeek.onOpenWindow(window);
       },
-      onCloseWindow: function() {
+      onCloseWindow() {
         AeroPeek.onCloseWindow(window);
       }
     };
   }
   return null;
 });
 
 const nsIWebNavigation = Ci.nsIWebNavigation;
@@ -403,17 +403,17 @@ const gClickAndHoldListenersOnElement = 
     this._timers.delete(aElm);
 
     aElm.addEventListener("mousedown", this, true);
     aElm.addEventListener("click", this, true);
   }
 };
 
 const gSessionHistoryObserver = {
-  observe: function(subject, topic, data)
+  observe(subject, topic, data)
   {
     if (topic != "browser:purge-session-history")
       return;
 
     var backCommand = document.getElementById("Browser:Back");
     backCommand.setAttribute("disabled", "true");
     var fwdCommand = document.getElementById("Browser:Forward");
     fwdCommand.setAttribute("disabled", "true");
@@ -454,28 +454,28 @@ function findChildShell(aDocument, aDocS
       return docShell;
   }
   return null;
 }
 
 var gPopupBlockerObserver = {
   _reportButton: null,
 
-  onReportButtonMousedown: function(aEvent)
+  onReportButtonMousedown(aEvent)
   {
     // If this method is called on the same event tick as the popup gets
     // hidden, do nothing to avoid re-opening the popup.
     if (aEvent.button != 0 || aEvent.target != this._reportButton || this.isPopupHidingTick)
       return;
 
     document.getElementById("blockedPopupOptions")
             .openPopup(this._reportButton, "after_end", 0, 2, false, false, aEvent);
   },
 
-  handleEvent: function(aEvent)
+  handleEvent(aEvent)
   {
     if (aEvent.originalTarget != gBrowser.selectedBrowser)
       return;
 
     if (!this._reportButton)
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.selectedBrowser.blockedPopups ||
@@ -536,30 +536,30 @@ var gPopupBlockerObserver = {
       }
 
       // Record the fact that we've reported this blocked popup, so we don't
       // show it again.
       gBrowser.selectedBrowser.blockedPopups.reported = true;
     }
   },
 
-  toggleAllowPopupsForSite: function(aEvent)
+  toggleAllowPopupsForSite(aEvent)
   {
     var pm = Services.perms;
     var shouldBlock = aEvent.target.getAttribute("block") == "true";
     var perm = shouldBlock ? pm.DENY_ACTION : pm.ALLOW_ACTION;
     pm.addFromPrincipal(gBrowser.contentPrincipal, "popup", perm);
 
     if (!shouldBlock)
       this.showAllBlockedPopups(gBrowser.selectedBrowser);
 
     gBrowser.getNotificationBox().removeCurrentNotification();
   },
 
-  fillPopupList: function(aEvent)
+  fillPopupList(aEvent)
   {
     // XXXben - rather than using |currentURI| here, which breaks down on multi-framed sites
     //          we should really walk the blockedPopups and create a list of "allow for <host>"
     //          menuitems for the common subset of hosts present in the report, this will
     //          make us frame-safe.
     //
     // XXXjst - Note that when this is fixed to work with multi-framed sites,
     //          also back out the fix for bug 343772 where
@@ -652,50 +652,50 @@ var gPopupBlockerObserver = {
 
       // Show the separator if we added any
       // showable popup addresses to the menu.
       if (foundUsablePopupURI)
         blockedPopupsSeparator.removeAttribute("hidden");
     }, null);
   },
 
-  onPopupHiding: function(aEvent) {
+  onPopupHiding(aEvent) {
     if (aEvent.target.anchorNode.id == "page-report-button")
       aEvent.target.anchorNode.removeAttribute("open");
 
     this.isPopupHidingTick = true;
     setTimeout(() => this.isPopupHidingTick = false, 0);
 
     let item = aEvent.target.lastChild;
     while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {
       let next = item.previousSibling;
       item.parentNode.removeChild(item);
       item = next;
     }
   },
 
-  showBlockedPopup: function(aEvent)
+  showBlockedPopup(aEvent)
   {
     var target = aEvent.target;
     var popupReportIndex = target.getAttribute("popupReportIndex");
     let browser = target.popupReportBrowser;
     browser.unblockPopup(popupReportIndex);
   },
 
-  showAllBlockedPopups: function(aBrowser)
+  showAllBlockedPopups(aBrowser)
   {
     aBrowser.retrieveListOfBlockedPopups().then(popups => {
       for (let i = 0; i < popups.length; i++) {
         if (popups[i].popupWindowURIspec)
           aBrowser.unblockPopup(i);
       }
     }, null);
   },
 
-  editPopupSettings: function()
+  editPopupSettings()
   {
     let prefillValue = "";
     try {
       // We use contentPrincipal rather than currentURI to get the right
       // value in case this is a data: URI that's inherited off something else.
       // Some principals don't have URIs, so fall back in case URI is not present.
       let principalURI = gBrowser.contentPrincipal.URI || gBrowser.currentURI;
       if (principalURI) {
@@ -724,17 +724,17 @@ var gPopupBlockerObserver = {
       existingWindow.initWithParams(params);
       existingWindow.focus();
     }
     else
       window.openDialog("chrome://browser/content/preferences/permissions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
-  dontShowMessage: function()
+  dontShowMessage()
   {
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
     gBrowser.getNotificationBox().removeCurrentNotification();
   }
 };
 
 function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
@@ -819,29 +819,29 @@ function gKeywordURIFixup({ target: brow
       "keywordURIFixup.message", [hostName]);
     let yesMessage = gNavigatorBundle.getFormattedString(
       "keywordURIFixup.goTo", [hostName])
 
     let buttons = [
       {
         label: yesMessage,
         accessKey: gNavigatorBundle.getString("keywordURIFixup.goTo.accesskey"),
-        callback: function() {
+        callback() {
           // Do not set this preference while in private browsing.
           if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
             let pref = "browser.fixup.domainwhitelist." + asciiHost;
             Services.prefs.setBoolPref(pref, true);
           }
           openUILinkIn(alternativeURI.spec, "current");
         }
       },
       {
         label: gNavigatorBundle.getString("keywordURIFixup.dismiss"),
         accessKey: gNavigatorBundle.getString("keywordURIFixup.dismiss.accesskey"),
-        callback: function() {
+        callback() {
           let notification = notificationBox.getNotificationWithValue("keyword-uri-fixup");
           notificationBox.removeNotification(notification, true);
         }
       }
     ];
     let notification =
       notificationBox.appendNotification(message, "keyword-uri-fixup", null,
                                          notificationBox.PRIORITY_INFO_HIGH,
@@ -891,21 +891,21 @@ function _loadURIWithFlags(browser, uri,
                                                referrer, referrerPolicy,
                                                postData, null, null);
     } else {
       if (postData) {
         postData = NetUtil.readInputStreamToString(postData, postData.available());
       }
 
       let loadParams = {
-        uri: uri,
-        flags: flags,
+        uri,
+        flags,
         referrer: referrer ? referrer.spec : null,
-        referrerPolicy: referrerPolicy,
-        postData: postData
+        referrerPolicy,
+        postData
       }
 
       if (params.userContextId) {
         loadParams.userContextId = params.userContextId;
       }
 
       LoadInOtherProcess(browser, loadParams);
     }
@@ -996,17 +996,17 @@ addEventListener("DOMContentLoaded", fun
   }
 
   gBrowser.updateBrowserRemoteness(initBrowser, gMultiProcessBrowser);
 });
 
 var gBrowserInit = {
   delayedStartupFinished: false,
 
-  onLoad: function() {
+  onLoad() {
     gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false);
 
     Services.obs.addObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed", false);
 
     window.addEventListener("AppCommand", HandleAppCommandEvent, true);
 
     // These routines add message listeners. They must run before
     // loading the frame script to ensure that we don't miss any
@@ -1099,22 +1099,22 @@ var gBrowserInit = {
 
     // Wait until chrome is painted before executing code not critical to making the window visible
     this._boundDelayedStartup = this._delayedStartup.bind(this);
     window.addEventListener("MozAfterPaint", this._boundDelayedStartup);
 
     this._loadHandled = true;
   },
 
-  _cancelDelayedStartup: function() {
+  _cancelDelayedStartup() {
     window.removeEventListener("MozAfterPaint", this._boundDelayedStartup);
     this._boundDelayedStartup = null;
   },
 
-  _delayedStartup: function() {
+  _delayedStartup() {
     let tmp = {};
     Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", tmp);
     let TelemetryTimestamps = tmp.TelemetryTimestamps;
     TelemetryTimestamps.add("delayedStartupStarted");
 
     this._cancelDelayedStartup();
 
     // We need to set the OfflineApps message listeners up before we
@@ -1465,17 +1465,17 @@ var gBrowserInit = {
 
     this.delayedStartupFinished = true;
 
     Services.obs.notifyObservers(window, "browser-delayed-startup-finished", "");
     TelemetryTimestamps.add("delayedStartupFinished");
   },
 
   // Returns the URI(s) to load at startup.
-  _getUriToLoad: function() {
+  _getUriToLoad() {
     // window.arguments[0]: URI to load (string), or an nsIArray of
     //                      nsISupportsStrings to load, or a xul:tab of
     //                      a tabbrowser, which will be replaced by this
     //                      window (for this case, all other arguments are
     //                      ignored).
     if (!window.arguments || !window.arguments[0])
       return null;
 
@@ -1489,17 +1489,17 @@ var gBrowserInit = {
     // If the given URI matches defaultArgs (the default homepage) we want
     // to block its load if we're going to restore a session anyway.
     if (uri == defaultArgs && sessionStartup.willOverrideHomepage)
       return null;
 
     return uri;
   },
 
-  onUnload: function() {
+  onUnload() {
     // In certain scenarios it's possible for unload to be fired before onload,
     // (e.g. if the window is being closed after browser.js loads but before the
     // load completes). In that case, there's nothing to do here.
     if (!this._loadHandled)
       return;
 
     // First clean up services initialized in gBrowserInit.onLoad (or those whose
     // uninit methods don't depend on the services having been initialized).
@@ -2049,17 +2049,17 @@ var gLastOpenDirectory = {
     }
     this._lastDir = val.clone();
 
     // Don't save the last open directory pref inside the Private Browsing mode
     if (!PrivateBrowsingUtils.isWindowPrivate(window))
       gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile,
                                    this._lastDir);
   },
-  reset: function() {
+  reset() {
     this._lastDir = null;
   }
 };
 
 function BrowserOpenFileWindow()
 {
   // Get filepicker component.
   try {
@@ -2106,20 +2106,20 @@ function BrowserTryToCloseWindow()
     window.close();     // WindowIsClosing does all the necessary checks
 }
 
 function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
                  userContextId, originPrincipal, forceAboutBlankViewerInCurrent) {
   try {
     openLinkIn(uri, "current",
                { referrerURI: referrer,
-                 referrerPolicy: referrerPolicy,
-                 postData: postData,
-                 allowThirdPartyFixup: allowThirdPartyFixup,
-                 userContextId: userContextId,
+                 referrerPolicy,
+                 postData,
+                 allowThirdPartyFixup,
+                 userContextId,
                  originPrincipal,
                  forceAboutBlankViewerInCurrent,
                });
   } catch (e) {}
 }
 
 /**
  * Given a string, will generate a more appropriate urlbar value if a Places
@@ -2362,17 +2362,17 @@ function BrowserViewSourceOfDocument(aAr
  * top-level document of the browser. This is really just a
  * convenience wrapper around BrowserViewSourceOfDocument.
  *
  * @param browser
  *        The browser that we want to load the source of.
  */
 function BrowserViewSource(browser) {
   BrowserViewSourceOfDocument({
-    browser: browser,
+    browser,
     outerWindowID: browser.outerWindowID,
     URL: browser.currentURI.spec,
   });
 }
 
 // documentURL - URL of the document to view, or null for this window's document
 // initialTab - name of the initial tab to display, or null for the first tab
 // imageElement - image to load in the Media Tab of the Page Info window; can be null/omitted
@@ -2611,127 +2611,127 @@ var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_DOWNLOAD: "download",
   BADGEID_FXA: "fxa",
 
   fxaBadge: null,
   downloadBadge: null,
   appUpdateBadge: null,
 
-  init: function() {
+  init() {
     PanelUI.panel.addEventListener("popupshowing", this, true);
   },
 
-  uninit: function() {
+  uninit() {
     PanelUI.panel.removeEventListener("popupshowing", this, true);
   },
 
-  handleEvent: function(e) {
+  handleEvent(e) {
     if (e.type === "popupshowing") {
       this.clearBadges();
     }
   },
 
-  _showBadge: function() {
+  _showBadge() {
     let badgeToShow = this.downloadBadge || this.appUpdateBadge || this.fxaBadge;
 
     if (badgeToShow) {
       PanelUI.menuButton.setAttribute("badge-status", badgeToShow);
     } else {
       PanelUI.menuButton.removeAttribute("badge-status");
     }
   },
 
-  _changeBadge: function(badgeId, badgeStatus = null) {
+  _changeBadge(badgeId, badgeStatus = null) {
     if (badgeId == this.BADGEID_APPUPDATE) {
       this.appUpdateBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_DOWNLOAD) {
       this.downloadBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_FXA) {
       this.fxaBadge = badgeStatus;
     } else {
       Cu.reportError("The badge ID '" + badgeId + "' is unknown!");
     }
     this._showBadge();
   },
 
-  addBadge: function(badgeId, badgeStatus) {
+  addBadge(badgeId, badgeStatus) {
     if (!badgeStatus) {
       Cu.reportError("badgeStatus must be defined");
       return;
     }
     this._changeBadge(badgeId, badgeStatus);
   },
 
-  removeBadge: function(badgeId) {
+  removeBadge(badgeId) {
     this._changeBadge(badgeId);
   },
 
-  clearBadges: function() {
+  clearBadges() {
     this.appUpdateBadge = null;
     this.downloadBadge = null;
     this.fxaBadge = null;
     this._showBadge();
   }
 };
 
 // Setup the hamburger button badges for updates, if enabled.
 var gMenuButtonUpdateBadge = {
   enabled: false,
   badgeWaitTime: 0,
   timer: null,
   cancelObserverRegistered: false,
 
-  init: function() {
+  init() {
     try {
       this.enabled = Services.prefs.getBoolPref("app.update.badge");
     } catch (e) {}
     if (this.enabled) {
       try {
         this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime");
       } catch (e) {
         this.badgeWaitTime = 345600; // 4 days
       }
       Services.obs.addObserver(this, "update-staged", false);
       Services.obs.addObserver(this, "update-downloaded", false);
     }
   },
 
-  uninit: function() {
+  uninit() {
     if (this.timer)
       this.timer.cancel();
     if (this.enabled) {
       Services.obs.removeObserver(this, "update-staged");
       Services.obs.removeObserver(this, "update-downloaded");
       this.enabled = false;
     }
     if (this.cancelObserverRegistered) {
       Services.obs.removeObserver(this, "update-canceled");
       this.cancelObserverRegistered = false;
     }
   },
 
-  onMenuPanelCommand: function(event) {
+  onMenuPanelCommand(event) {
     if (event.originalTarget.getAttribute("update-status") === "succeeded") {
       // restart the app
       let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
                        .createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
 
       if (!cancelQuit.data) {
         Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
       }
     } else {
       // open the page for manual update
       let url = Services.urlFormatter.formatURLPref("app.update.url.manual");
       openUILinkIn(url, "tab");
     }
   },
 
-  observe: function(subject, topic, status) {
+  observe(subject, topic, status) {
     if (topic == "update-canceled") {
       this.reset();
       return;
     }
     if (status == "failed") {
       // Background update has failed, let's show the UI responsible for
       // prompting the user to update manually.
       this.uninit();
@@ -2741,25 +2741,25 @@ var gMenuButtonUpdateBadge = {
 
     // Give the user badgeWaitTime seconds to react before prompting.
     this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this.timer.initWithCallback(this, this.badgeWaitTime * 1000,
                                 this.timer.TYPE_ONE_SHOT);
     // The timer callback will call uninit() when it completes.
   },
 
-  notify: function() {
+  notify() {
     // If the update is successfully applied, or if the updater has fallen back
     // to non-staged updates, add a badge to the hamburger menu to indicate an
     // update will be applied once the browser restarts.
     this.uninit();
     this.displayBadge(true);
   },
 
-  displayBadge: function(succeeded) {
+  displayBadge(succeeded) {
     let status = succeeded ? "succeeded" : "failed";
     let badgeStatus = "update-" + status;
     gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_APPUPDATE, badgeStatus);
 
     let stringId;
     let updateButtonText;
     if (succeeded) {
       let brandBundle = document.getElementById("bundle_brand");
@@ -2775,17 +2775,17 @@ var gMenuButtonUpdateBadge = {
     }
 
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.setAttribute("label", updateButtonText);
     updateButton.setAttribute("update-status", status);
     updateButton.hidden = false;
   },
 
-  reset: function() {
+  reset() {
     gMenuButtonBadgeManager.removeBadge(
       gMenuButtonBadgeManager.BADGEID_APPUPDATE);
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.hidden = true;
     this.uninit();
     this.init();
   }
 };
@@ -2803,61 +2803,61 @@ const PREF_SSL_IMPACT = PREF_SSL_IMPACT_
 }, []);
 
 /**
  * Handle command events bubbling up from error page content
  * or from about:newtab or from remote error pages that invoke
  * us via async messaging.
  */
 var BrowserOnClick = {
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("Browser:CertExceptionError", this);
     mm.addMessageListener("Browser:OpenCaptivePortalPage", this);
     mm.addMessageListener("Browser:SiteBlockedError", this);
     mm.addMessageListener("Browser:EnableOnlineMode", this);
     mm.addMessageListener("Browser:SendSSLErrorReport", this);
     mm.addMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.addMessageListener("Browser:ResetSSLPreferences", this);
     mm.addMessageListener("Browser:SSLErrorReportTelemetry", this);
     mm.addMessageListener("Browser:OverrideWeakCrypto", this);
     mm.addMessageListener("Browser:SSLErrorGoBack", this);
 
     Services.obs.addObserver(this, "captive-portal-login-abort", false);
     Services.obs.addObserver(this, "captive-portal-login-success", false);
   },
 
-  uninit: function() {
+  uninit() {
     let mm = window.messageManager;
     mm.removeMessageListener("Browser:CertExceptionError", this);
     mm.removeMessageListener("Browser:SiteBlockedError", this);
     mm.removeMessageListener("Browser:EnableOnlineMode", this);
     mm.removeMessageListener("Browser:SendSSLErrorReport", this);
     mm.removeMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.removeMessageListener("Browser:ResetSSLPreferences", this);
     mm.removeMessageListener("Browser:SSLErrorReportTelemetry", this);
     mm.removeMessageListener("Browser:OverrideWeakCrypto", this);
     mm.removeMessageListener("Browser:SSLErrorGoBack", this);
 
     Services.obs.removeObserver(this, "captive-portal-login-abort");
     Services.obs.removeObserver(this, "captive-portal-login-success");
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "captive-portal-login-abort":
       case "captive-portal-login-success":
         // Broadcast when a captive portal is freed so that error pages
         // can refresh themselves.
         window.messageManager.broadcastAsyncMessage("Browser:CaptivePortalFreed");
       break;
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (!event.isTrusted || // Don't trust synthetic events
         event.button == 2) {
       return;
     }
 
     let originalTarget = event.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (!ownerDoc) {
@@ -2865,17 +2865,17 @@ var BrowserOnClick = {
     }
 
     if (gMultiProcessBrowser &&
         ownerDoc.documentURI.toLowerCase() == "about:newtab") {
       this.onE10sAboutNewTab(event, ownerDoc);
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "Browser:CertExceptionError":
         this.onCertError(msg.target, msg.data.elementId,
                          msg.data.isTopFrame, msg.data.location,
                          msg.data.securityInfoAsString);
       break;
       case "Browser:OpenCaptivePortalPage":
         this.onOpenCaptivePortalPage();
@@ -2923,48 +2923,48 @@ var BrowserOnClick = {
           PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser));
       break;
       case "Browser:SSLErrorGoBack":
         goBackFromErrorPage();
       break;
     }
   },
 
-  onSSLErrorReport: function(browser, uri, securityInfo) {
+  onSSLErrorReport(browser, uri, securityInfo) {
     if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) {
       Cu.reportError("User requested certificate error report sending, but certificate error reporting is disabled");
       return;
     }
 
     let serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
                            .getService(Ci.nsISerializationHelper);
     let transportSecurityInfo = serhelper.deserializeObject(securityInfo);
     transportSecurityInfo.QueryInterface(Ci.nsITransportSecurityInfo)
 
     let errorReporter = Cc["@mozilla.org/securityreporter;1"]
                           .getService(Ci.nsISecurityReporter);
     errorReporter.reportTLSError(transportSecurityInfo,
                                  uri.host, uri.port);
   },
 
-  onCertError: function(browser, elementId, isTopFrame, location, securityInfoAsString) {
+  onCertError(browser, elementId, isTopFrame, location, securityInfoAsString) {
     let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
     let securityInfo;
 
     switch (elementId) {
       case "exceptionDialogButton":
         if (isTopFrame) {
           secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_CLICK_ADD_EXCEPTION);
         }
 
         securityInfo = getSecurityInfo(securityInfoAsString);
         let sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider)
                                     .SSLStatus;
         let params = { exceptionAdded : false,
-                       sslStatus : sslStatus };
+                       sslStatus };
 
         try {
           switch (Services.prefs.getIntPref("browser.ssl_override_behavior")) {
             case 2 : // Pre-fetch & pre-populate
               params.prefetchCert = true;
             case 1 : // Pre-populate
               params.location = location;
           }
@@ -3009,17 +3009,17 @@ var BrowserOnClick = {
         let detailedInfo = getDetailedCertErrorInfo(location,
                                                     securityInfo);
         gClipboardHelper.copyString(detailedInfo);
         break;
 
     }
   },
 
-  onOpenCaptivePortalPage: function() {
+  onOpenCaptivePortalPage() {
     // Open a new tab with the canonical URL that we use to check for a captive portal.
     // It will be redirected to the login page.
     let canonicalURL = Services.prefs.getCharPref("captivedetect.canonicalURL");
     let tab = gBrowser.addTab(canonicalURL);
     let canonicalURI = makeURI(canonicalURL);
     gBrowser.selectedTab = tab;
 
     // When we are no longer captive, close the tab if it's at the canonical URL.
@@ -3031,17 +3031,17 @@ var BrowserOnClick = {
         return;
       }
       gBrowser.removeTab(tab);
     }
     Services.obs.addObserver(tabCloser, "captive-portal-login-abort", false);
     Services.obs.addObserver(tabCloser, "captive-portal-login-success", false);
   },
 
-  onAboutBlocked: function(elementId, reason, isTopFrame, location) {
+  onAboutBlocked(elementId, reason, isTopFrame, location) {
     // Depending on what page we are displaying here (malware/phishing/unwanted)
     // use the right strings and links for each.
     let bucketName = "";
     let sendTelemetry = false;
     if (reason === 'malware') {
       sendTelemetry = true;
       bucketName = "WARNING_MALWARE_PAGE_";
     } else if (reason === 'phishing') {
@@ -3086,66 +3086,66 @@ var BrowserOnClick = {
   },
 
   /**
    * This functions prevents navigation from happening directly through the <a>
    * link in about:newtab (which is loaded in the parent and therefore would load
    * the next page also in the parent) and instructs the browser to open the url
    * in the current tab which will make it update the remoteness of the tab.
    */
-  onE10sAboutNewTab: function(event, ownerDoc) {
+  onE10sAboutNewTab(event, ownerDoc) {
     let isTopFrame = (ownerDoc.defaultView.parent === ownerDoc.defaultView);
     if (!isTopFrame) {
       return;
     }
 
     let anchorTarget = event.originalTarget.parentNode;
 
     if (anchorTarget instanceof HTMLAnchorElement &&
         anchorTarget.classList.contains("newtab-link")) {
       event.preventDefault();
       let where = whereToOpenLink(event, false, false);
       openLinkIn(anchorTarget.href, where, { charset: ownerDoc.characterSet, referrerURI: ownerDoc.documentURIObject });
     }
   },
 
-  ignoreWarningButton: function(reason) {
+  ignoreWarningButton(reason) {
     // Allow users to override and continue through to the site,
     // but add a notify bar as a reminder, so that they don't lose
     // track after, e.g., tab switching.
     gBrowser.loadURIWithFlags(gBrowser.currentURI.spec,
                               nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
                               null, null, null);
 
     Services.perms.add(gBrowser.currentURI, "safe-browsing",
                        Ci.nsIPermissionManager.ALLOW_ACTION,
                        Ci.nsIPermissionManager.EXPIRE_SESSION);
 
     let buttons = [{
       label: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.label"),
       accessKey: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.accessKey"),
-      callback: function() { getMeOutOfHere(); }
+      callback() { getMeOutOfHere(); }
     }];
 
     let title;
     if (reason === 'malware') {
       title = gNavigatorBundle.getString("safebrowsing.reportedAttackSite");
       buttons[1] = {
         label: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.label"),
         accessKey: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.accessKey"),
-        callback: function() {
+        callback() {
           openUILinkIn(gSafeBrowsing.getReportURL('MalwareMistake'), 'tab');
         }
       };
     } else if (reason === 'phishing') {
       title = gNavigatorBundle.getString("safebrowsing.deceptiveSite");
       buttons[1] = {
         label: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.label"),
         accessKey: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.accessKey"),
-        callback: function() {
+        callback() {
           openUILinkIn(gSafeBrowsing.getReportURL('PhishMistake'), 'tab');
         }
       };
     } else if (reason === 'unwanted') {
       title = gNavigatorBundle.getString("safebrowsing.reportedUnwantedSite");
       // There is no button for reporting errors since Google doesn't currently
       // provide a URL endpoint for these reports.
     }
@@ -3369,78 +3369,78 @@ function getPEMString(cert)
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
 
 var PrintPreviewListener = {
   _printPreviewTab: null,
   _tabBeforePrintPreview: null,
   _simplifyPageTab: null,
 
-  getPrintPreviewBrowser: function() {
+  getPrintPreviewBrowser() {
     if (!this._printPreviewTab) {
       let browser = gBrowser.selectedTab.linkedBrowser;
       let preferredRemoteType = browser.remoteType;
       this._tabBeforePrintPreview = gBrowser.selectedTab;
       this._printPreviewTab = gBrowser.loadOneTab("about:blank",
                                                   { inBackground: false,
                                                     preferredRemoteType,
                                                     relatedBrowser: browser });
       gBrowser.selectedTab = this._printPreviewTab;
     }
     return gBrowser.getBrowserForTab(this._printPreviewTab);
   },
-  createSimplifiedBrowser: function() {
+  createSimplifiedBrowser() {
     this._simplifyPageTab = gBrowser.loadOneTab("about:blank",
                                                 { inBackground: true });
     return this.getSimplifiedSourceBrowser();
   },
-  getSourceBrowser: function() {
+  getSourceBrowser() {
     return this._tabBeforePrintPreview ?
       this._tabBeforePrintPreview.linkedBrowser : gBrowser.selectedBrowser;
   },
-  getSimplifiedSourceBrowser: function() {
+  getSimplifiedSourceBrowser() {
     return this._simplifyPageTab ?
       gBrowser.getBrowserForTab(this._simplifyPageTab) : null;
   },
-  getNavToolbox: function() {
+  getNavToolbox() {
     return gNavToolbox;
   },
-  onEnter: function() {
+  onEnter() {
     // We might have accidentally switched tabs since the user invoked print
     // preview
     if (gBrowser.selectedTab != this._printPreviewTab) {
       gBrowser.selectedTab = this._printPreviewTab;
     }
     gInPrintPreviewMode = true;
     this._toggleAffectedChrome();
   },
-  onExit: function() {
+  onExit() {
     gBrowser.selectedTab = this._tabBeforePrintPreview;
     this._tabBeforePrintPreview = null;
     gInPrintPreviewMode = false;
     this._toggleAffectedChrome();
     if (this._simplifyPageTab) {
       gBrowser.removeTab(this._simplifyPageTab);
       this._simplifyPageTab = null;
     }
     gBrowser.removeTab(this._printPreviewTab);
     gBrowser.deactivatePrintPreviewBrowsers();
     this._printPreviewTab = null;
   },
-  _toggleAffectedChrome: function() {
+  _toggleAffectedChrome() {
     gNavToolbox.collapsed = gInPrintPreviewMode;
 
     if (gInPrintPreviewMode)
       this._hideChrome();
     else
       this._showChrome();
 
     TabsInTitlebar.allowedBy("print-preview", !gInPrintPreviewMode);
   },
-  _hideChrome: function() {
+  _hideChrome() {
     this._chromeState = {};
 
     this._chromeState.sidebarOpen = SidebarUI.isOpen;
     this._sidebarCommand = SidebarUI.currentID;
     SidebarUI.hide();
 
     var notificationBox = gBrowser.getNotificationBox();
     this._chromeState.notificationsOpen = !notificationBox.notificationsHidden;
@@ -3458,17 +3458,17 @@ var PrintPreviewListener = {
 
     this._chromeState.syncNotificationsOpen = false;
     var syncNotifications = document.getElementById("sync-notifications");
     if (syncNotifications) {
       this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
       syncNotifications.notificationsHidden = true;
     }
   },
-  _showChrome: function() {
+  _showChrome() {
     if (this._chromeState.notificationsOpen)
       gBrowser.getNotificationBox().notificationsHidden = false;
 
     if (this._chromeState.findOpen)
       gFindBar.open();
 
     if (this._chromeState.globalNotificationsOpen)
       document.getElementById("global-notificationbox").notificationsHidden = false;
@@ -3494,47 +3494,47 @@ function getMarkupDocumentViewer()
 function FillInHTMLTooltip(tipElement)
 {
   document.getElementById("aHTMLTooltip").fillInPageTooltip(tipElement);
 }
 
 var browserDragAndDrop = {
   canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true),
 
-  dragOver: function(aEvent)
+  dragOver(aEvent)
   {
     if (this.canDropLink(aEvent)) {
       aEvent.preventDefault();
     }
   },
 
-  dropLinks: function(aEvent, aDisallowInherit) {
+  dropLinks(aEvent, aDisallowInherit) {
     return Services.droppedLinkHandler.dropLinks(aEvent, aDisallowInherit);
   }
 };
 
 var homeButtonObserver = {
-  onDrop: function(aEvent)
+  onDrop(aEvent)
     {
       // disallow setting home pages that inherit the principal
       let links = browserDragAndDrop.dropLinks(aEvent, true);
       if (links.length) {
         setTimeout(openHomeDialog, 0, links.map(link => link.url).join("|"));
       }
     },
 
-  onDragOver: function(aEvent)
+  onDragOver(aEvent)
     {
       if (gPrefService.prefIsLocked("browser.startup.homepage")) {
         return;
       }
       browserDragAndDrop.dragOver(aEvent);
       aEvent.dropEffect = "link";
     },
-  onDragExit: function(aEvent)
+  onDragExit(aEvent)
     {
     }
 }
 
 function openHomeDialog(aURL)
 {
   var promptTitle = gNavigatorBundle.getString("droponhometitle");
   var promptMsg;
@@ -3591,63 +3591,63 @@ var newWindowButtonObserver = {
         // Allow third-party services to fixup this URL.
         openNewWindowWith(data.url, null, data.postData, true);
       }
     }
   })
 }
 
 const DOMLinkHandler = {
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("Link:AddFeed", this);
     mm.addMessageListener("Link:SetIcon", this);
     mm.addMessageListener("Link:AddSearch", this);
   },
 
-  receiveMessage: function(aMsg) {
+  receiveMessage(aMsg) {
     switch (aMsg.name) {
       case "Link:AddFeed":
         let link = {type: aMsg.data.type, href: aMsg.data.href, title: aMsg.data.title};
         FeedHandler.addFeed(link, aMsg.target);
         break;
 
       case "Link:SetIcon":
         this.setIcon(aMsg.target, aMsg.data.url, aMsg.data.loadingPrincipal);
         break;
 
       case "Link:AddSearch":
         this.addSearch(aMsg.target, aMsg.data.engine, aMsg.data.url);
         break;
     }
   },
 
-  setIcon: function(aBrowser, aURL, aLoadingPrincipal) {
+  setIcon(aBrowser, aURL, aLoadingPrincipal) {
     if (gBrowser.isFailedIcon(aURL))
       return false;
 
     let tab = gBrowser.getTabForBrowser(aBrowser);
     if (!tab)
       return false;
 
     gBrowser.setIcon(tab, aURL, aLoadingPrincipal);
     return true;
   },
 
-  addSearch: function(aBrowser, aEngine, aURL) {
+  addSearch(aBrowser, aEngine, aURL) {
     let tab = gBrowser.getTabForBrowser(aBrowser);
     if (!tab)
       return;
 
     BrowserSearch.addEngine(aBrowser, aEngine, makeURI(aURL));
   },
 }
 
 const BrowserSearch = {
-  addEngine: function(browser, engine, uri) {
+  addEngine(browser, engine, uri) {
     // Check to see whether we've already added an engine with this title
     if (browser.engines) {
       if (browser.engines.some(e => e.title == engine.title))
         return;
     }
 
     var hidden = false;
     // If this engine (identified by title) is already in the list, add it
@@ -3673,17 +3673,17 @@ const BrowserSearch = {
     }
   },
 
   /**
    * Update the browser UI to show whether or not additional engines are
    * available when a page is loaded or the user switches tabs to a page that
    * has search engines.
    */
-  updateOpenSearchBadge: function() {
+  updateOpenSearchBadge() {
     var searchBar = this.searchBar;
     if (!searchBar)
       return;
 
     var engines = gBrowser.selectedBrowser.engines;
     if (engines && engines.length > 0)
       searchBar.setAttribute("addengines", "true");
     else
@@ -3765,17 +3765,17 @@ const BrowserSearch = {
    * @param purpose [optional]
    *        A string meant to indicate the context of the search request. This
    *        allows the search service to provide a different nsISearchSubmission
    *        depending on e.g. where the search is triggered in the UI.
    *
    * @return engine The search engine used to perform a search, or null if no
    *                search was performed.
    */
-  _loadSearch: function(searchText, useNewTab, purpose) {
+  _loadSearch(searchText, useNewTab, purpose) {
     let engine;
 
     // If the search bar is visible, use the current engine, otherwise, fall
     // back to the default engine.
     if (isElementVisible(this.searchBar))
       engine = Services.search.currentEngine;
     else
       engine = Services.search.defaultEngine;
@@ -3789,17 +3789,17 @@ const BrowserSearch = {
     if (!submission) {
       return null;
     }
 
     let inBackground = Services.prefs.getBoolPref("browser.search.context.loadInBackground");
     openLinkIn(submission.uri.spec,
                useNewTab ? "tab" : "current",
                { postData: submission.postData,
-                 inBackground: inBackground,
+                 inBackground,
                  relatedToCurrent: true });
 
     return engine;
   },
 
   /**
    * Just like _loadSearch, but preserving an old API.
    *
@@ -3815,24 +3815,24 @@ const BrowserSearch = {
   },
 
   /**
    * Perform a search initiated from the context menu.
    *
    * This should only be called from the context menu. See
    * BrowserSearch.loadSearch for the preferred API.
    */
-  loadSearchFromContext: function(terms) {
+  loadSearchFromContext(terms) {
     let engine = BrowserSearch._loadSearch(terms, true, "contextmenu");
     if (engine) {
       BrowserSearch.recordSearchInTelemetry(engine, "contextmenu");
     }
   },
 
-  pasteAndSearch: function(event) {
+  pasteAndSearch(event) {
     BrowserSearch.searchBar.select();
     goDoCommand("cmd_paste");
     BrowserSearch.searchBar.handleSearchCommand(event);
   },
 
   /**
    * Returns the search bar element if it is present in the toolbar, null otherwise.
    */
@@ -3845,17 +3845,17 @@ const BrowserSearch = {
   },
 
   loadAddEngines: function BrowserSearch_loadAddEngines() {
     var newWindowPref = gPrefService.getIntPref("browser.link.open_newwindow");
     var where = newWindowPref == 3 ? "tab" : "window";
     openUILinkIn(this.searchEnginesURL, where);
   },
 
-  _getSearchEngineId: function(engine) {
+  _getSearchEngineId(engine) {
     if (engine && engine.identifier) {
       return engine.identifier;
     }
 
     if (!engine || (engine.name === undefined) ||
         !Services.prefs.getBoolPref("toolkit.telemetry.enabled"))
       return "other";
 
@@ -3874,17 +3874,17 @@ const BrowserSearch = {
    *        allowed values.
    * @param details [optional]
    *        An optional parameter passed to |BrowserUsageTelemetry.recordSearch|.
    *        See its documentation for allowed options.
    *        Additionally, if the search was a suggested search, |details.selection|
    *        indicates where the item was in the suggestion list and how the user
    *        selected it: {selection: {index: The selected index, kind: "key" or "mouse"}}
    */
-  recordSearchInTelemetry: function(engine, source, details = {}) {
+  recordSearchInTelemetry(engine, source, details = {}) {
     BrowserUITelemetry.countSearchEvent(source, null, details.selection);
     try {
       BrowserUsageTelemetry.recordSearch(engine, source, details);
     } catch (ex) {
       Cu.reportError(ex);
     }
   },
 
@@ -3898,17 +3898,17 @@ const BrowserSearch = {
    * @param source
    *        (string) Where the search originated from. See BrowserUsageTelemetry for
    *        allowed values.
    * @param type
    *        (string) Indicates how the user selected the search item.
    * @param where
    *        (string) Where was the search link opened (e.g. new tab, current tab, ..).
    */
-  recordOneoffSearchInTelemetry: function(engine, source, type, where) {
+  recordOneoffSearchInTelemetry(engine, source, type, where) {
     let id = this._getSearchEngineId(engine) + "." + source;
     BrowserUITelemetry.countOneoffSearchEvent(id, type, where);
     try {
       const details = {type, isOneOff: true};
       BrowserUsageTelemetry.recordSearch(engine, source, details);
     } catch (ex) {
       Cu.reportError(ex);
     }
@@ -4290,17 +4290,17 @@ var XULBrowserWindow = {
   defaultStatus: "",
   overLink: "",
   startTime: 0,
   statusText: "",
   isBusy: false,
   // Left here for add-on compatibility, see bug 752434
   inContentWhitelist: [],
 
-  QueryInterface: function(aIID) {
+  QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIWebProgressListener) ||
         aIID.equals(Ci.nsIWebProgressListener2) ||
         aIID.equals(Ci.nsISupportsWeakReference) ||
         aIID.equals(Ci.nsIXULBrowserWindow) ||
         aIID.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_NOINTERFACE;
   },
@@ -4320,82 +4320,82 @@ var XULBrowserWindow = {
     delete this.isImage;
     return this.isImage = document.getElementById("isImage");
   },
   get canViewSource() {
     delete this.canViewSource;
     return this.canViewSource = document.getElementById("canViewSource");
   },
 
-  init: function() {
+  init() {
     // Initialize the security button's state and tooltip text.
     var securityUI = gBrowser.securityUI;
     this.onSecurityChange(null, null, securityUI.state, true);
   },
 
-  setJSStatus: function() {
+  setJSStatus() {
     // unsupported
   },
 
-  forceInitialBrowserRemote: function(aRemoteType) {
+  forceInitialBrowserRemote(aRemoteType) {
     let initBrowser =
       document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
     gBrowser.updateBrowserRemoteness(initBrowser, true, { remoteType: aRemoteType });
   },
 
-  forceInitialBrowserNonRemote: function(aOpener) {
+  forceInitialBrowserNonRemote(aOpener) {
     let initBrowser =
       document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
     gBrowser.updateBrowserRemoteness(initBrowser, false, { opener: aOpener });
   },
 
-  setDefaultStatus: function(status) {
+  setDefaultStatus(status) {
     this.defaultStatus = status;
     this.updateStatusField();
   },
 
-  setOverLink: function(url, anchorElt) {
+  setOverLink(url, anchorElt) {
     // Encode bidirectional formatting characters.
     // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
     url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
                       encodeURIComponent);
 
     if (gURLBar && gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */)
       url = trimURL(url);
 
     this.overLink = url;
     LinkTargetDisplay.update();
   },
 
-  showTooltip: function(x, y, tooltip, direction) {
+  showTooltip(x, y, tooltip, direction) {
     if (Cc["@mozilla.org/widget/dragservice;1"].getService(Ci.nsIDragService).
         getCurrentSession()) {
       return;
     }
 
     // The x,y coordinates are relative to the <browser> element using
     // the chrome zoom level.
     let elt = document.getElementById("remoteBrowserTooltip");
     elt.label = tooltip;
     elt.style.direction = direction;
 
     let anchor = gBrowser.selectedBrowser;
     elt.openPopupAtScreen(anchor.boxObject.screenX + x, anchor.boxObject.screenY + y, false, null);
   },
 
-  hideTooltip: function() {
+  hideTooltip() {
     let elt = document.getElementById("remoteBrowserTooltip");
     elt.hidePopup();
   },
 
-  getTabCount: function() {
+  getTabCount() {
     return gBrowser.tabs.length;
   },
 
-  updateStatusField: function() {
+  updateStatusField() {
     var text, type, types = ["overLink"];
     if (this._busyUI)
       types.push("status");
     types.push("defaultStatus");
     for (type of types) {
       text = this[type];
       if (text)
         break;
@@ -4409,24 +4409,24 @@ var XULBrowserWindow = {
       field.setAttribute("type", type);
       field.label = text;
       field.setAttribute("crop", type == "overLink" ? "center" : "end");
       this.statusText = text;
     }
   },
 
   // Called before links are navigated to to allow us to retarget them if needed.
-  onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
+  onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
     SocialUI.closeSocialPanelForLinkTraversal(target, linkNode);
     return target;
   },
 
   // Check whether this URI should load in the current process
-  shouldLoadURI: function(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer) {
     if (!gMultiProcessBrowser)
       return true;
 
     let browser = aDocShell.QueryInterface(Ci.nsIDocShellTreeItem)
                            .sameTypeRootTreeItem
                            .QueryInterface(Ci.nsIDocShell)
                            .chromeEventHandler;
 
@@ -4437,32 +4437,32 @@ var XULBrowserWindow = {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
       return false;
     }
 
     return true;
   },
 
-  onProgressChange: function(aWebProgress, aRequest,
+  onProgressChange(aWebProgress, aRequest,
                              aCurSelfProgress, aMaxSelfProgress,
                              aCurTotalProgress, aMaxTotalProgress) {
     // Do nothing.
   },
 
-  onProgressChange64: function(aWebProgress, aRequest,
+  onProgressChange64(aWebProgress, aRequest,
                                aCurSelfProgress, aMaxSelfProgress,
                                aCurTotalProgress, aMaxTotalProgress) {
     return this.onProgressChange(aWebProgress, aRequest,
       aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress,
       aMaxTotalProgress);
   },
 
   // This function fires only for the currently selected tab.
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     const nsIWebProgressListener = Ci.nsIWebProgressListener;
     const nsIChannel = Ci.nsIChannel;
 
     let browser = gBrowser.selectedBrowser;
 
     if (aStateFlags & nsIWebProgressListener.STATE_START &&
         aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
 
@@ -4536,17 +4536,17 @@ var XULBrowserWindow = {
         this._busyUI = false;
 
         this.stopCommand.setAttribute("disabled", "true");
         CombinedStopReload.switchToReload(aRequest instanceof Ci.nsIRequest);
       }
     }
   },
 
-  onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
     var location = aLocationURI ? aLocationURI.spec : "";
 
     // If displayed, hide the form validation popup.
     FormValidationHandler.hidePopup();
 
     let pageTooltip = document.getElementById("aHTMLTooltip");
     let tooltipNode = pageTooltip.triggerNode;
     if (tooltipNode) {
@@ -4680,40 +4680,40 @@ var XULBrowserWindow = {
         // Don't make noise when the crash reporter is built but not enabled.
         if (ex.result != Components.results.NS_ERROR_NOT_INITIALIZED) {
           throw ex;
         }
       }
     }
   },
 
-  asyncUpdateUI: function() {
+  asyncUpdateUI() {
     FeedHandler.updateFeeds();
     BrowserSearch.updateOpenSearchBadge();
   },
 
   // Left here for add-on compatibility, see bug 752434
-  hideChromeForLocation: function() {},
-
-  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
+  hideChromeForLocation() {},
+
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     this.status = aMessage;
     this.updateStatusField();
   },
 
   // Properties used to cache security state used to update the UI
   _state: null,
   _lastLocation: null,
 
   // This is called in multiple ways:
   //  1. Due to the nsIWebProgressListener.onSecurityChange notification.
   //  2. Called by tabbrowser.xml when updating the current browser.
   //  3. Called directly during this object's initializations.
   // aRequest will be null always in case 2 and 3, and sometimes in case 1 (for
   // instance, there won't be a request when STATE_BLOCKED_TRACKING_CONTENT is observed).
-  onSecurityChange: function(aWebProgress, aRequest, aState, aIsSimulated) {
+  onSecurityChange(aWebProgress, aRequest, aState, aIsSimulated) {
     // Don't need to do anything if the data we use to update the UI hasn't
     // changed
     let uri = gBrowser.currentURI;
     let spec = uri.spec;
     if (this._state == aState &&
         this._lastLocation == spec)
       return;
     this._state = aState;
@@ -4775,17 +4775,17 @@ var LinkTargetDisplay = {
 
   DELAY_HIDE: 250,
   _timer: 0,
 
   get _isVisible() {
     return XULBrowserWindow.statusTextField.label != "";
   },
 
-  update: function() {
+  update() {
     clearTimeout(this._timer);
     window.removeEventListener("mousemove", this, true);
 
     if (!XULBrowserWindow.overLink) {
       if (XULBrowserWindow.hideOverLinkImmediately)
         this._hide();
       else
         this._timer = setTimeout(this._hide.bind(this), this.DELAY_HIDE);
@@ -4796,85 +4796,85 @@ var LinkTargetDisplay = {
       XULBrowserWindow.updateStatusField();
     } else {
       // Let the display appear when the mouse doesn't move within the delay
       this._showDelayed();
       window.addEventListener("mousemove", this, true);
     }
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "mousemove":
         // Restart the delay since the mouse was moved
         clearTimeout(this._timer);
         this._showDelayed();
         break;
     }
   },
 
-  _showDelayed: function() {
+  _showDelayed() {
     this._timer = setTimeout(function(self) {
       XULBrowserWindow.updateStatusField();
       window.removeEventListener("mousemove", self, true);
     }, this.DELAY_SHOW, this);
   },
 
-  _hide: function() {
+  _hide() {
     clearTimeout(this._timer);
 
     XULBrowserWindow.updateStatusField();
   }
 };
 
 var CombinedStopReload = {
-  init: function() {
+  init() {
     if (this._initialized)
       return;
 
     let reload = document.getElementById("urlbar-reload-button");
     let stop = document.getElementById("urlbar-stop-button");
     if (!stop || !reload || reload.nextSibling != stop)
       return;
 
     this._initialized = true;
     if (XULBrowserWindow.stopCommand.getAttribute("disabled") != "true")
       reload.setAttribute("displaystop", "true");
     stop.addEventListener("click", this, false);
     this.reload = reload;
     this.stop = stop;
   },
 
-  uninit: function() {
+  uninit() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this._initialized = false;
     this.stop.removeEventListener("click", this, false);
     this.reload = null;
     this.stop = null;
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     // the only event we listen to is "click" on the stop button
     if (event.button == 0 &&
         !this.stop.disabled)
       this._stopClicked = true;
   },
 
-  switchToStop: function() {
+  switchToStop() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this.reload.setAttribute("displaystop", "true");
   },
 
-  switchToReload: function(aDelay) {
+  switchToReload(aDelay) {
     if (!this._initialized)
       return;
 
     this.reload.removeAttribute("displaystop");
 
     if (!aDelay || this._stopClicked) {
       this._stopClicked = false;
       this._cancelTransition();
@@ -4891,30 +4891,30 @@ var CombinedStopReload = {
     this.reload.disabled = true;
     this._timer = setTimeout(function(self) {
       self._timer = 0;
       self.reload.disabled = XULBrowserWindow.reloadCommand
                                              .getAttribute("disabled") == "true";
     }, 650, this);
   },
 
-  _cancelTransition: function() {
+  _cancelTransition() {
     if (this._timer) {
       clearTimeout(this._timer);
       this._timer = 0;
     }
   }
 };
 
 var TabsProgressListener = {
   // Keep track of which browsers we've started load timers for, since
   // we won't see STATE_START events for pre-rendered tabs.
   _startedLoadTimer: new WeakSet(),
 
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     // Collect telemetry data about tab load times.
     if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) {
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
           this._startedLoadTimer.add(aBrowser);
           TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
           Services.telemetry.getHistogramById("FX_TOTAL_TOP_VISITS").add(true);
         } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
@@ -4958,17 +4958,17 @@ var TabsProgressListener = {
         aBrowser.removeEventListener("click", BrowserOnClick, true);
         aBrowser.removeEventListener("pagehide", onPageHide, true);
         if (event.target.documentElement)
           event.target.documentElement.removeAttribute("hasBrowserHandlers");
       }, true);
     }
   },
 
-  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+  onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI,
                              aFlags) {
     // Filter out location changes caused by anchor navigation
     // or history.push/pop/replaceState.
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
       // Reader mode actually cares about these:
       let mm = gBrowser.selectedBrowser.messageManager;
       mm.sendAsyncMessage("Reader:PushState", {isArticle: gBrowser.selectedBrowser.isArticle});
       return;
@@ -4996,17 +4996,17 @@ var TabsProgressListener = {
   },
 }
 
 function nsBrowserAccess() { }
 
 nsBrowserAccess.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow, Ci.nsISupports]),
 
-  _openURIInNewTab: function(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
+  _openURIInNewTab(aURI, aReferrer, aReferrerPolicy, aIsPrivate,
                              aIsExternal, aForceNotRemote = false,
                              aUserContextId = Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID,
                              aOpener = null) {
     let win, needToFocusWin;
 
     // try the current window.  if we're in a popup, fall back on the most recent browser window
     if (window.toolbar.visible)
       win = window;
@@ -5040,17 +5040,17 @@ nsBrowserAccess.prototype = {
     let browser = win.gBrowser.getBrowserForTab(tab);
 
     if (needToFocusWin || (!loadInBackground && aIsExternal))
       win.focus();
 
     return browser;
   },
 
-  openURI: function(aURI, aOpener, aWhere, aFlags) {
+  openURI(aURI, aOpener, aWhere, aFlags) {
     // This function should only ever be called if we're opening a URI
     // from a non-remote browser window (via nsContentTreeOwner).
     if (aOpener && Cu.isCrossProcessWrapper(aOpener)) {
       Cu.reportError("nsBrowserAccess.openURI was passed a CPOW for aOpener. " +
                      "openURI should only ever be called from non-remote browsers.");
       throw Cr.NS_ERROR_FAILURE;
     }
 
@@ -5121,17 +5121,17 @@ nsBrowserAccess.prototype = {
         newWindow = content;
         if (aURI) {
           let loadflags = isExternal ?
                             Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
                             Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
           gBrowser.loadURIWithFlags(aURI.spec, {
                                     flags: loadflags,
                                     referrerURI: referrer,
-                                    referrerPolicy: referrerPolicy,
+                                    referrerPolicy,
                                     });
         }
         if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
           window.focus();
     }
     return newWindow;
   },
 
@@ -5155,17 +5155,17 @@ nsBrowserAccess.prototype = {
                                         isExternal, false,
                                         userContextId);
     if (browser)
       return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
 
     return null;
   },
 
-  isTabContentWindow: function(aWindow) {
+  isTabContentWindow(aWindow) {
     return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
   },
 
   canClose() {
     return CanCloseWindow();
   },
 }
 
@@ -5371,39 +5371,39 @@ var gTabletModePageCounter = {
 function displaySecurityInfo()
 {
   BrowserPageInfo(null, "securityTab");
 }
 
 
 var gHomeButton = {
   prefDomain: "browser.startup.homepage",
-  observe: function(aSubject, aTopic, aPrefName)
+  observe(aSubject, aTopic, aPrefName)
   {
     if (aTopic != "nsPref:changed" || aPrefName != this.prefDomain)
       return;
 
     this.updateTooltip();
   },
 
-  updateTooltip: function(homeButton)
+  updateTooltip(homeButton)
   {
     if (!homeButton)
       homeButton = document.getElementById("home-button");
     if (homeButton) {
       var homePage = this.getHomePage();
       homePage = homePage.replace(/\|/g, ', ');
       if (["about:home", "about:newtab"].includes(homePage.toLowerCase()))
         homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
       else
         homeButton.setAttribute("tooltiptext", homePage);
     }
   },
 
-  getHomePage: function()
+  getHomePage()
   {
     var url;
     try {
       url = gPrefService.getComplexValue(this.prefDomain,
                                 Components.interfaces.nsIPrefLocalizedString).data;
     } catch (e) {
     }
 
@@ -5698,18 +5698,18 @@ function handleLinkClick(event, href, li
       referrerPolicy = referrerAttrValue;
     }
   }
 
   urlSecurityCheck(href, doc.nodePrincipal);
   let params = {
     charset: doc.characterSet,
     allowMixedContent: persistAllowMixedContentInChildTab,
-    referrerURI: referrerURI,
-    referrerPolicy: referrerPolicy,
+    referrerURI,
+    referrerPolicy,
     noReferrer: BrowserUtils.linkHasNoReferrer(linkNode),
     originPrincipal: doc.nodePrincipal,
   };
 
   // The new tab/window must use the same userContextId
   if (doc.nodePrincipal.originAttributes.userContextId) {
     params.userContextId = doc.nodePrincipal.originAttributes.userContextId;
   }
@@ -5879,17 +5879,17 @@ var gPageStyleMenu = {
   //   the current page.
   //
   // preferredStyleSheetSet (bool):
   //   Whether or not the user currently has the "Default" style selected
   //   for the current page.
   //
   _pageStyleSheets: new WeakMap(),
 
-  init: function() {
+  init() {
     let mm = window.messageManager;
     mm.addMessageListener("PageStyle:StyleSheets", (msg) => {
       this._pageStyleSheets.set(msg.target.permanentKey, msg.data);
     });
   },
 
   /**
    * Returns an array of Objects representing stylesheets in a
@@ -5899,42 +5899,42 @@ var gPageStyleMenu = {
    * @param browser (optional)
    *        The <xul:browser> to search for stylesheets. If omitted, this
    *        defaults to the currently selected tab's browser.
    * @returns Array
    *        An Array of Objects representing stylesheets in the browser.
    *        See the documentation for gPageStyleMenu for a description
    *        of the Object structure.
    */
-  getBrowserStyleSheets: function(browser) {
+  getBrowserStyleSheets(browser) {
     if (!browser) {
       browser = gBrowser.selectedBrowser;
     }
 
     let data = this._pageStyleSheets.get(browser.permanentKey);
     if (!data) {
       return [];
     }
     return data.filteredStyleSheets;
   },
 
-  _getStyleSheetInfo: function(browser) {
+  _getStyleSheetInfo(browser) {
     let data = this._pageStyleSheets.get(browser.permanentKey);
     if (!data) {
       return {
         filteredStyleSheets: [],
         authorStyleDisabled: false,
         preferredStyleSheetSet: true
       };
     }
 
     return data;
   },
 
-  fillPopup: function(menuPopup) {
+  fillPopup(menuPopup) {
     let styleSheetInfo = this._getStyleSheetInfo(gBrowser.selectedBrowser);
     var noStyle = menuPopup.firstChild;
     var persistentOnly = noStyle.nextSibling;
     var sep = persistentOnly.nextSibling;
     while (sep.nextSibling)
       menuPopup.removeChild(sep.nextSibling);
 
     let styleSheets = styleSheetInfo.filteredStyleSheets;
@@ -5968,22 +5968,22 @@ var gPageStyleMenu = {
     }
 
     noStyle.setAttribute("checked", styleDisabled);
     persistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled);
     persistentOnly.hidden = styleSheetInfo.preferredStyleSheetSet ? haveAltSheets : false;
     sep.hidden = (noStyle.hidden && persistentOnly.hidden) || !haveAltSheets;
   },
 
-  switchStyleSheet: function(title) {
+  switchStyleSheet(title) {
     let mm = gBrowser.selectedBrowser.messageManager;
-    mm.sendAsyncMessage("PageStyle:Switch", {title: title});
-  },
-
-  disableStyle: function() {
+    mm.sendAsyncMessage("PageStyle:Switch", {title});
+  },
+
+  disableStyle() {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.sendAsyncMessage("PageStyle:Disable");
   },
 };
 
 /* Legacy global page-style functions */
 var stylesheetFillPopup = gPageStyleMenu.fillPopup.bind(gPageStyleMenu);
 function stylesheetSwitchAll(contentWindow, title) {
@@ -5994,89 +5994,89 @@ function stylesheetSwitchAll(contentWind
 }
 function setStyleDisabled(disabled) {
   if (disabled)
     gPageStyleMenu.disableStyle();
 }
 
 
 var LanguageDetectionListener = {
-  init: function() {
+  init() {
     window.messageManager.addMessageListener("Translation:DocumentState", msg => {
       Translation.documentStateReceived(msg.target, msg.data);
     });
   }
 };
 
 
 var BrowserOffline = {
   _inited: false,
 
   // BrowserOffline Public Methods
-  init: function()
+  init()
   {
     if (!this._uiElement)
       this._uiElement = document.getElementById("workOfflineMenuitemState");
 
     Services.obs.addObserver(this, "network:offline-status-changed", false);
 
     this._updateOfflineUI(Services.io.offline);
 
     this._inited = true;
   },
 
-  uninit: function()
+  uninit()
   {
     if (this._inited) {
       Services.obs.removeObserver(this, "network:offline-status-changed");
     }
   },
 
-  toggleOfflineStatus: function()
+  toggleOfflineStatus()
   {
     var ioService = Services.io;
 
     if (!ioService.offline && !this._canGoOffline()) {
       this._updateOfflineUI(false);
       return;
     }
 
     ioService.offline = !ioService.offline;
   },
 
   // nsIObserver
-  observe: function(aSubject, aTopic, aState)
+  observe(aSubject, aTopic, aState)
   {
     if (aTopic != "network:offline-status-changed")
       return;
 
     // This notification is also received because of a loss in connectivity,
     // which we ignore by updating the UI to the current value of io.offline
     this._updateOfflineUI(Services.io.offline);
   },
 
   // BrowserOffline Implementation Methods
-  _canGoOffline: function()
+  _canGoOffline()
   {
     try {
       var cancelGoOffline = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelGoOffline, "offline-requested", null);
 
       // Something aborted the quit process.
       if (cancelGoOffline.data)
         return false;
     }
     catch (ex) {
     }
 
     return true;
   },
 
   _uiElement: null,
-  _updateOfflineUI: function(aOffline)
+  _updateOfflineUI(aOffline)
   {
     var offlineLocked = gPrefService.prefIsLocked("network.online");
     if (offlineLocked)
       this._uiElement.setAttribute("disabled", "true");
 
     this._uiElement.setAttribute("checked", aOffline);
   }
 };
@@ -6160,26 +6160,26 @@ var OfflineApps = {
     if (notification) {
       notification.options.controlledItems.push([
         Cu.getWeakReference(browser), docId, uri
       ]);
     } else {
       let mainAction = {
         label: gNavigatorBundle.getString("offlineApps.allowStoring.label"),
         accessKey: gNavigatorBundle.getString("offlineApps.allowStoring.accesskey"),
-        callback: function() {
+        callback() {
           for (let [ciBrowser, ciDocId, ciUri] of notification.options.controlledItems) {
             OfflineApps.allowSite(ciBrowser, ciDocId, ciUri);
           }
         }
       };
       let secondaryActions = [{
         label: gNavigatorBundle.getString("offlineApps.dontAllow.label"),
         accessKey: gNavigatorBundle.getString("offlineApps.dontAllow.accesskey"),
-        callback: function() {
+        callback() {
           for (let [, , ciUri] of notification.options.controlledItems) {
             OfflineApps.disallowSite(ciUri);
           }
         }
       }];
       let message = gNavigatorBundle.getFormattedString("offlineApps.available2",
                                                         [host]);
       let anchorID = "indexedDB-notification-icon";
@@ -6278,27 +6278,27 @@ var IndexedDBPromptHelper = {
       responseTopic = this._permissionsResponse;
     }
 
     var observer = requestor.getInterface(Ci.nsIObserver);
 
     var mainAction = {
       label: gNavigatorBundle.getString("offlineApps.allowStoring.label"),
       accessKey: gNavigatorBundle.getString("offlineApps.allowStoring.accesskey"),
-      callback: function() {
+      callback() {
         observer.observe(null, responseTopic,
                          Ci.nsIPermissionManager.ALLOW_ACTION);
       }
     };
 
     var secondaryActions = [
       {
         label: gNavigatorBundle.getString("offlineApps.dontAllow.label"),
         accessKey: gNavigatorBundle.getString("offlineApps.dontAllow.accesskey"),
-        callback: function() {
+        callback() {
           observer.observe(null, responseTopic,
                            Ci.nsIPermissionManager.DENY_ACTION);
         }
       }
     ];
 
     PopupNotifications.show(browser, topic, message,
                             this._notificationIcon, mainAction,
@@ -6409,38 +6409,38 @@ function warnAboutClosingWindow() {
   // OS X doesn't quit the application when the last window is closed, but keeps
   // the session alive. Hence don't prompt users to save tabs, but warn about
   // closing multiple tabs.
   return AppConstants.platform != "macosx"
          || (isPBWindow || gBrowser.warnAboutClosingTabs(gBrowser.closingTabsEnum.ALL));
 }
 
 var MailIntegration = {
-  sendLinkForBrowser: function(aBrowser) {
+  sendLinkForBrowser(aBrowser) {
     this.sendMessage(aBrowser.currentURI.spec, aBrowser.contentTitle);
   },
 
-  sendMessage: function(aBody, aSubject) {
+  sendMessage(aBody, aSubject) {
     // generate a mailto url based on the url and the url's title
     var mailtoUrl = "mailto:";
     if (aBody) {
       mailtoUrl += "?body=" + encodeURIComponent(aBody);
       mailtoUrl += "&subject=" + encodeURIComponent(aSubject);
     }
 
     var uri = makeURI(mailtoUrl);
 
     // now pass this uri to the operating system
     this._launchExternalUrl(uri);
   },
 
   // a generic method which can be used to pass arbitrary urls to the operating
   // system.
   // aURL --> a nsIURI which represents the url to launch
-  _launchExternalUrl: function(aURL) {
+  _launchExternalUrl(aURL) {
     var extProtocolSvc =
        Cc["@mozilla.org/uriloader/external-protocol-service;1"]
          .getService(Ci.nsIExternalProtocolService);
     if (extProtocolSvc)
       extProtocolSvc.loadUrl(aURL);
   }
 };
 
@@ -6499,17 +6499,17 @@ function AddKeywordForSearchField() {
     mm.removeMessageListener("ContextMenu:SearchFieldBookmarkData:Result", onMessage);
 
     let bookmarkData = message.data;
     let title = gNavigatorBundle.getFormattedString("addKeywordTitleAutoFill",
                                                     [bookmarkData.title]);
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "bookmark"
                                      , uri: makeURI(bookmarkData.spec)
-                                     , title: title
+                                     , title
                                      , description: bookmarkData.description
                                      , keyword: ""
                                      , postData: bookmarkData.postData
                                      , charSet: bookmarkData.charset
                                      , hiddenRows: [ "location"
                                                    , "description"
                                                    , "tags"
                                                    , "loadInSidebar" ]
@@ -6835,17 +6835,17 @@ var gIdentityHandler = {
     }
     return this._permissionAnchors = permissionAnchors;
   },
 
   /**
    * Handler for mouseclicks on the "More Information" button in the
    * "identity-popup" panel.
    */
-  handleMoreInfoClick : function(event) {
+  handleMoreInfoClick(event) {
     displaySecurityInfo();
     event.stopPropagation();
     this._identityPopup.hidePopup();
   },
 
   toggleSubView(name, anchor) {
     let view = this._identityPopupMultiView;
     if (view.showingSubView) {
@@ -6893,17 +6893,17 @@ var gIdentityHandler = {
     BrowserReloadSkipCache();
     this._identityPopup.hidePopup();
   },
 
   /**
    * Helper to parse out the important parts of _sslStatus (of the SSL cert in
    * particular) for use in constructing identity UI strings
   */
-  getIdentityData : function() {
+  getIdentityData() {
     var result = {};
     var cert = this._sslStatus.serverCert;
 
     // Human readable name of Subject
     result.subjectOrg = cert.organization;
 
     // SubjectName fields, broken up for individual access
     if (cert.subjectName) {
@@ -6994,17 +6994,17 @@ var gIdentityHandler = {
     if (this._identityPopup.state == "open") {
       this._handleHeightChange(() => this.updateSitePermissions());
     }
   },
 
   /**
    * Attempt to provide proper IDN treatment for host names
    */
-  getEffectiveHost: function() {
+  getEffectiveHost() {
     if (!this._IDNService)
       this._IDNService = Cc["@mozilla.org/network/idn-service;1"]
                          .getService(Ci.nsIIDNService);
     try {
       return this._IDNService.convertToDisplayIDN(this._uri.host, {});
     } catch (e) {
       // If something goes wrong (e.g. host is an IP address) just fail back
       // to the full domain.
@@ -7174,17 +7174,17 @@ var gIdentityHandler = {
       if (this._uri.port > 0) {
         port = this._uri.port;
       }
     } catch (e) {}
 
     let buttons = [{
       label: gNavigatorBundle.getString("revokeOverride.label"),
       accessKey: gNavigatorBundle.getString("revokeOverride.accesskey"),
-      callback: function(aNotification, aButton) {
+      callback(aNotification, aButton) {
         try {
           let weakCryptoOverride = Cc["@mozilla.org/security/weakcryptooverride;1"]
                                      .getService(Ci.nsIWeakCryptoOverride);
           weakCryptoOverride.removeWeakCryptoOverride(host, port,
             PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser));
           BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
         } catch (e) {
           Cu.reportError(e);
@@ -7364,17 +7364,17 @@ var gIdentityHandler = {
     } catch (ex) {
       // NetUtil's methods will throw for malformed URIs and the like
     }
   },
 
   /**
    * Click handler for the identity-box element in primary chrome.
    */
-  handleIdentityButtonEvent : function(event) {
+  handleIdentityButtonEvent(event) {
     event.stopPropagation();
 
     if ((event.type == "click" && event.button != 0) ||
         (event.type == "keypress" && event.charCode != KeyEvent.DOM_VK_SPACE &&
          event.keyCode != KeyEvent.DOM_VK_RETURN)) {
       return; // Left click, space or enter only
     }
 
@@ -7425,52 +7425,52 @@ var gIdentityHandler = {
   },
 
   observe(subject, topic, data) {
     if (topic == "perm-changed") {
       this.refreshIdentityBlock();
     }
   },
 
-  onDragStart: function(event) {
+  onDragStart(event) {
     if (gURLBar.getAttribute("pageproxystate") != "valid")
       return;
 
     let value = gBrowser.currentURI.spec;
     let urlString = value + "\n" + gBrowser.contentTitle;
     let htmlString = "<a href=\"" + value + "\">" + value + "</a>";
 
     let dt = event.dataTransfer;
     dt.setData("text/x-moz-url", urlString);
     dt.setData("text/uri-list", value);
     dt.setData("text/plain", value);
     dt.setData("text/html", htmlString);
     dt.setDragImage(this._identityIcon, 16, 16);
   },
 
-  onLocationChange: function() {
+  onLocationChange() {
     this._permissionJustRemoved = false;
     this.updatePermissionHint();
   },
 
-  updatePermissionHint: function() {
+  updatePermissionHint() {
     if (!this._permissionList.hasChildNodes() && !this._permissionJustRemoved) {
       this._permissionEmptyHint.removeAttribute("hidden");
     } else {
       this._permissionEmptyHint.setAttribute("hidden", "true");
     }
 
     if (this._permissionJustRemoved) {
       this._permissionReloadHint.removeAttribute("hidden");
     } else {
       this._permissionReloadHint.setAttribute("hidden", "true");
     }
   },
 
-  updateSitePermissions: function() {
+  updateSitePermissions() {
     while (this._permissionList.hasChildNodes())
       this._permissionList.removeChild(this._permissionList.lastChild);
 
     let uri = gBrowser.currentURI;
 
     let permissions = SitePermissions.getPermissionDetailsByURI(uri);
     if (this._sharingState) {
       // If WebRTC device or screen permissions are in use, we need to find
@@ -7499,31 +7499,31 @@ var gIdentityHandler = {
     for (let permission of permissions) {
       let item = this._createPermissionItem(permission);
       this._permissionList.appendChild(item);
     }
 
     this.updatePermissionHint();
   },
 
-  _handleHeightChange: function(aFunction, aWillShowReloadHint) {
+  _handleHeightChange(aFunction, aWillShowReloadHint) {
     let heightBefore = getComputedStyle(this._permissionList).height;
     aFunction();
     let heightAfter = getComputedStyle(this._permissionList).height;
     // Showing the reload hint increases the height, we need to account for it.
     if (aWillShowReloadHint) {
       heightAfter = parseInt(heightAfter) +
                     parseInt(getComputedStyle(this._permissionList.nextSibling).height);
     }
     let heightChange = parseInt(heightAfter) - parseInt(heightBefore);
     if (heightChange)
       this._identityPopupMultiView.setHeightToFit(heightChange);
   },
 
-  _createPermissionItem: function(aPermission) {
+  _createPermissionItem(aPermission) {
     let container = document.createElement("hbox");
     container.setAttribute("class", "identity-popup-permission-item");
     container.setAttribute("align", "center");
 
     let img = document.createElement("image");
     let classes = "identity-popup-permission-icon " + aPermission.id + "-icon";
     if (aPermission.state == SitePermissions.BLOCK)
       classes += " blocked-permission-icon";
@@ -7676,17 +7676,17 @@ var gPrivateBrowsingUI = {
     if (!urlBarSearchParam.includes("private-window")) {
       urlBarSearchParam += " private-window";
     }
     gURLBar.setAttribute("autocompletesearchparam", urlBarSearchParam);
   }
 };
 
 var gRemoteTabsUI = {
-  init: function() {
+  init() {
     if (window.location.href != getBrowserURL() &&
         // Also check hidden window for the Mac no-window case
         window.location.href != "chrome://browser/content/hiddenWindow.xul") {
       return;
     }
 
     if (AppConstants.platform == "macosx" &&
         Services.prefs.getBoolPref("layers.acceleration.disabled")) {
@@ -7823,25 +7823,25 @@ function switchToTabHavingURI(aURI, aOpe
     else
       openUILinkIn(aURI.spec, "tab", aOpenParams);
   }
 
   return false;
 }
 
 var RestoreLastSessionObserver = {
-  init: function() {
+  init() {
     if (SessionStore.canRestoreLastSession &&
         !PrivateBrowsingUtils.isWindowPrivate(window)) {
       Services.obs.addObserver(this, "sessionstore-last-session-cleared", true);
       goSetCommandEnabled("Browser:RestoreLastSession", true);
     }
   },
 
-  observe: function() {
+  observe() {
     // The last session can only be restored once so there's
     // no way we need to re-enable our menu item.
     Services.obs.removeObserver(this, "sessionstore-last-session-cleared");
     goSetCommandEnabled("Browser:RestoreLastSession", false);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference])
@@ -8042,45 +8042,45 @@ var MousePosTracker = {
   _listeners: new Set(),
   _x: 0,
   _y: 0,
   get _windowUtils() {
     delete this._windowUtils;
     return this._windowUtils = window.getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  addListener: function(listener) {
+  addListener(listener) {
     if (this._listeners.has(listener))
       return;
 
     listener._hover = false;
     this._listeners.add(listener);
 
     this._callListener(listener);
   },
 
-  removeListener: function(listener) {
+  removeListener(listener) {
     this._listeners.delete(listener);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     var fullZoom = this._windowUtils.fullZoom;
     this._x = event.screenX / fullZoom - window.mozInnerScreenX;
     this._y = event.screenY / fullZoom - window.mozInnerScreenY;
 
     this._listeners.forEach(function(listener) {
       try {
         this._callListener(listener);
       } catch (e) {
         Cu.reportError(e);
       }
     }, this);
   },
 
-  _callListener: function(listener) {
+  _callListener(listener) {
     let rect = listener.getMouseTargetRect();
     let hover = this._x >= rect.left &&
                 this._x <= rect.right &&
                 this._y >= rect.top &&
                 this._y <= rect.bottom;
 
     if (hover == listener._hover)
       return;
@@ -8092,58 +8092,58 @@ var MousePosTracker = {
         listener.onMouseEnter();
     } else if (listener.onMouseLeave) {
       listener.onMouseLeave();
     }
   }
 };
 
 var ToolbarIconColor = {
-  init: function() {
+  init() {
     this._initialized = true;
 
     window.addEventListener("activate", this);
     window.addEventListener("deactivate", this);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
 
     // If the window isn't active now, we assume that it has never been active
     // before and will soon become active such that inferFromText will be
     // called from the initial activate event.
     if (Services.focus.activeWindow == window)
       this.inferFromText();
   },
 
-  uninit: function() {
+  uninit() {
     this._initialized = false;
 
     window.removeEventListener("activate", this);
     window.removeEventListener("deactivate", this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update");
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "activate":
       case "deactivate":
         this.inferFromText();
         break;
     }
   },
 
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "lightweight-theme-styling-update":
         // inferFromText needs to run after LightweightThemeConsumer.jsm's
         // lightweight-theme-styling-update observer.
         setTimeout(() => { this.inferFromText(); }, 0);
         break;
     }
   },
 
-  inferFromText: function() {
+  inferFromText() {
     if (!this._initialized)
       return;
 
     function parseRGB(aColorString) {
       let rgb = aColorString.match(/^rgba?\((\d+), (\d+), (\d+)/);
       rgb.shift();
       return rgb.map(x => parseInt(x));
     }
@@ -8167,48 +8167,48 @@ var ToolbarIconColor = {
         toolbar.removeAttribute("brighttext");
       else
         toolbar.setAttribute("brighttext", "true");
     }
   }
 }
 
 var PanicButtonNotifier = {
-  init: function() {
+  init() {
     this._initialized = true;
     if (window.PanicButtonNotifierShouldNotify) {
       delete window.PanicButtonNotifierShouldNotify;
       this.notify();
     }
   },
-  notify: function() {
+  notify() {
     if (!this._initialized) {
       window.PanicButtonNotifierShouldNotify = true;
       return;
     }
     // Display notification panel here...
     try {
       let popup = document.getElementById("panic-button-success-notification");
       popup.hidden = false;
       let widget = CustomizableUI.getWidget("panic-button").forWindow(window);
       let anchor = widget.anchor;
       anchor = document.getAnonymousElementByAttribute(anchor, "class", "toolbarbutton-icon");
       popup.openPopup(anchor, popup.getAttribute("position"));
     } catch (ex) {
       Cu.reportError(ex);
     }
   },
-  close: function() {
+  close() {
     let popup = document.getElementById("panic-button-success-notification");
     popup.hidePopup();
   },
 };
 
 var AboutPrivateBrowsingListener = {
-  init: function() {
+  init() {
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:OpenPrivateWindow",
       msg => {
         OpenBrowserWindow({private: true});
     });
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:ToggleTrackingProtection",
       msg => {
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -98,18 +98,18 @@ var handleContentContextMenu = function(
     defaultPrevented = false;
   }
 
   if (defaultPrevented)
     return;
 
   let addonInfo = {};
   let subject = {
-    event: event,
-    addonInfo: addonInfo,
+    event,
+    addonInfo,
   };
   subject.wrappedJSObject = subject;
   Services.obs.notifyObservers(subject, "content-contextmenu", null);
 
   let doc = event.target.ownerDocument;
   let docLocation = doc.mozDocumentURIIfNotForErrorPages;
   docLocation = docLocation && docLocation.spec;
   let charSet = doc.characterSet;
@@ -192,28 +192,28 @@ var handleContentContextMenu = function(
                    { event, popupNode: event.target });
   }
   else {
     // Break out to the parent window and pass the add-on info along
     let browser = docShell.chromeEventHandler;
     let mainWin = browser.ownerGlobal;
     mainWin.gContextMenuContentData = {
       isRemote: false,
-      event: event,
+      event,
       popupNode: event.target,
-      browser: browser,
-      addonInfo: addonInfo,
+      browser,
+      addonInfo,
       documentURIObject: doc.documentURIObject,
-      docLocation: docLocation,
-      charSet: charSet,
-      referrer: referrer,
-      referrerPolicy: referrerPolicy,
-      contentType: contentType,
-      contentDisposition: contentDisposition,
-      selectionInfo: selectionInfo,
+      docLocation,
+      charSet,
+      referrer,
+      referrerPolicy,
+      contentType,
+      contentDisposition,
+      selectionInfo,
       disableSetDesktopBackground: disableSetDesktopBg,
       loginFillInfo,
       parentAllowsMixedContent,
       userContextId,
     };
   }
 }
 
@@ -257,17 +257,17 @@ function getSerializedSecurityInfo(docSh
   }
   securityInfo.QueryInterface(Ci.nsITransportSecurityInfo)
               .QueryInterface(Ci.nsISerializable);
 
   return serhelper.serializeToString(securityInfo);
 }
 
 var AboutNetAndCertErrorListener = {
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     addMessageListener("CertErrorDetails", this);
     addMessageListener("Browser:CaptivePortalFreed", this);
     chromeGlobal.addEventListener('AboutNetErrorLoad', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorOpenCaptivePortal', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorSetAutomatic', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorOverride', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorResetPreferences', this, false, true);
   },
@@ -275,17 +275,17 @@ var AboutNetAndCertErrorListener = {
   get isAboutNetError() {
     return content.document.documentURI.startsWith("about:neterror");
   },
 
   get isAboutCertError() {
     return content.document.documentURI.startsWith("about:certerror");
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     if (!this.isAboutCertError) {
       return;
     }
 
     switch (msg.name) {
       case "CertErrorDetails":
         this.onCertErrorDetails(msg);
         break;
@@ -343,17 +343,17 @@ var AboutNetAndCertErrorListener = {
         break;
     }
   },
 
   onCaptivePortalFreed(msg) {
     content.dispatchEvent(new content.CustomEvent("AboutNetErrorCaptivePortalFreed"));
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (!this.isAboutNetError && !this.isAboutCertError) {
       return;
     }
 
     switch (aEvent.type) {
     case "AboutNetErrorLoad":
       this.onPageLoad(aEvent);
       break;
@@ -367,88 +367,88 @@ var AboutNetAndCertErrorListener = {
       this.onOverride(aEvent);
       break;
     case "AboutNetErrorResetPreferences":
       this.onResetPreferences(aEvent);
       break;
     }
   },
 
-  changedCertPrefs: function() {
+  changedCertPrefs() {
     for (let prefName of PREF_SSL_IMPACT) {
       if (Services.prefs.prefHasUserValue(prefName)) {
         return true;
       }
     }
 
     return false;
   },
 
-  onPageLoad: function(evt) {
+  onPageLoad(evt) {
     if (this.isAboutCertError) {
       let originalTarget = evt.originalTarget;
       let ownerDoc = originalTarget.ownerDocument;
       ClickEventHandler.onCertError(originalTarget, ownerDoc);
     }
 
     let automatic = Services.prefs.getBoolPref("security.ssl.errorReporting.automatic");
     content.dispatchEvent(new content.CustomEvent("AboutNetErrorOptions", {
       detail: JSON.stringify({
         enabled: Services.prefs.getBoolPref("security.ssl.errorReporting.enabled"),
         changedCertPrefs: this.changedCertPrefs(),
-        automatic: automatic
+        automatic
       })
     }));
 
     sendAsyncMessage("Browser:SSLErrorReportTelemetry",
                      {reportStatus: TLS_ERROR_REPORT_TELEMETRY_UI_SHOWN});
   },
 
-  openCaptivePortalPage: function(evt) {
+  openCaptivePortalPage(evt) {
     sendAsyncMessage("Browser:OpenCaptivePortalPage");
   },
 
 
-  onResetPreferences: function(evt) {
+  onResetPreferences(evt) {
     sendAsyncMessage("Browser:ResetSSLPreferences");
   },
 
-  onSetAutomatic: function(evt) {
+  onSetAutomatic(evt) {
     sendAsyncMessage("Browser:SetSSLErrorReportAuto", {
       automatic: evt.detail
     });
 
     // if we're enabling reports, send a report for this failure
     if (evt.detail) {
       let {host, port} = content.document.mozDocumentURIIfNotForErrorPages;
       sendAsyncMessage("Browser:SendSSLErrorReport", {
         uri: { host, port },
         securityInfo: getSerializedSecurityInfo(docShell),
       });
 
     }
   },
 
-  onOverride: function(evt) {
+  onOverride(evt) {
     let {host, port} = content.document.mozDocumentURIIfNotForErrorPages;
     sendAsyncMessage("Browser:OverrideWeakCrypto", { uri: {host, port} });
   }
 }
 
 AboutNetAndCertErrorListener.init(this);
 
 
 var ClickEventHandler = {
   init: function init() {
     Cc["@mozilla.org/eventlistenerservice;1"]
       .getService(Ci.nsIEventListenerService)
       .addSystemEventListener(global, "click", this, true);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (!event.isTrusted || event.defaultPrevented || event.button == 2) {
       return;
     }
 
     let originalTarget = event.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (!ownerDoc) {
       return;
@@ -479,17 +479,17 @@ var ClickEventHandler = {
       if (referrerAttrValue !== Ci.nsIHttpChannel.REFERRER_POLICY_UNSET) {
         referrerPolicy = referrerAttrValue;
       }
     }
 
     let json = { button: event.button, shiftKey: event.shiftKey,
                  ctrlKey: event.ctrlKey, metaKey: event.metaKey,
                  altKey: event.altKey, href: null, title: null,
-                 bookmark: false, referrerPolicy: referrerPolicy,
+                 bookmark: false, referrerPolicy,
                  originAttributes: principal ? principal.originAttributes : {},
                  isContentWindowPrivate: PrivateBrowsingUtils.isContentWindowPrivate(ownerDoc.defaultView)};
 
     if (href) {
       try {
         BrowserUtils.urlSecurityCheck(href, principal);
       } catch (e) {
         return;
@@ -530,44 +530,44 @@ var ClickEventHandler = {
     }
 
     // This might be middle mouse navigation.
     if (event.button == 1) {
       sendAsyncMessage("Content:Click", json);
     }
   },
 
-  onCertError: function(targetElement, ownerDoc) {
+  onCertError(targetElement, ownerDoc) {
     let docShell = ownerDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
                                        .getInterface(Ci.nsIWebNavigation)
                                        .QueryInterface(Ci.nsIDocShell);
     sendAsyncMessage("Browser:CertExceptionError", {
       location: ownerDoc.location.href,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView),
       securityInfoAsString: getSerializedSecurityInfo(docShell),
     });
   },
 
-  onAboutBlocked: function(targetElement, ownerDoc) {
+  onAboutBlocked(targetElement, ownerDoc) {
     var reason = 'phishing';
     if (/e=malwareBlocked/.test(ownerDoc.documentURI)) {
       reason = 'malware';
     } else if (/e=unwantedBlocked/.test(ownerDoc.documentURI)) {
       reason = 'unwanted';
     }
     sendAsyncMessage("Browser:SiteBlockedError", {
       location: ownerDoc.location.href,
-      reason: reason,
+      reason,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView)
     });
   },
 
-  onAboutNetError: function(event, documentURI) {
+  onAboutNetError(event, documentURI) {
     let elmId = event.originalTarget.getAttribute("id");
     if (elmId == "returnButton") {
       sendAsyncMessage("Browser:SSLErrorGoBack", {});
       return;
     }
     if (elmId != "errorTryAgain" || !/e=netOffline/.test(documentURI)) {
       return;
     }
@@ -586,17 +586,17 @@ var ClickEventHandler = {
    * @param event
    *        The click event.
    * @return [href, linkNode, linkPrincipal].
    *
    * @note linkNode will be null if the click wasn't on an anchor
    *       element. This includes SVG links, because callers expect |node|
    *       to behave like an <a> element, which SVG links (XLink) don't.
    */
-  _hrefAndLinkNodeForClickEvent: function(event) {
+  _hrefAndLinkNodeForClickEvent(event) {
     function isHTMLLink(aNode) {
       // Be consistent with what nsContextMenu.js does.
       return ((aNode instanceof content.HTMLAnchorElement && aNode.href) ||
               (aNode instanceof content.HTMLAreaElement && aNode.href) ||
               aNode instanceof content.HTMLLinkElement);
     }
 
     let node = event.target;
@@ -651,17 +651,17 @@ addMessageListener("rtcpeer:Allow", Cont
 addMessageListener("rtcpeer:Deny", ContentWebRTC);
 addMessageListener("webrtc:Allow", ContentWebRTC);
 addMessageListener("webrtc:Deny", ContentWebRTC);
 addMessageListener("webrtc:StopSharing", ContentWebRTC);
 addMessageListener("webrtc:StartBrowserSharing", () => {
   let windowID = content.QueryInterface(Ci.nsIInterfaceRequestor)
                         .getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
   sendAsyncMessage("webrtc:response:StartBrowserSharing", {
-    windowID: windowID
+    windowID
   });
 });
 
 addEventListener("pageshow", function(event) {
   if (event.target == content.document) {
     sendAsyncMessage("PageVisibility:Show", {
       persisted: event.persisted,
     });
@@ -871,30 +871,30 @@ addMessageListener("ContextMenu:SearchFi
   sendAsyncMessage("ContextMenu:SearchFieldBookmarkData:Result",
                    { spec, title, description, postData, charset });
 });
 
 addMessageListener("Bookmarks:GetPageDetails", (message) => {
   let doc = content.document;
   let isErrorPage = /^about:(neterror|certerror|blocked)/.test(doc.documentURI);
   sendAsyncMessage("Bookmarks:GetPageDetails:Result",
-                   { isErrorPage: isErrorPage,
+                   { isErrorPage,
                      description: PlacesUIUtils.getDescriptionFromDocument(doc) });
 });
 
 var LightWeightThemeWebInstallListener = {
   _previewWindow: null,
 
-  init: function() {
+  init() {
     addEventListener("InstallBrowserTheme", this, false, true);
     addEventListener("PreviewBrowserTheme", this, false, true);
     addEventListener("ResetBrowserThemePreview", this, false, true);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     switch (event.type) {
       case "InstallBrowserTheme": {
         sendAsyncMessage("LightWeightThemeWebInstaller:Install", {
           baseURI: event.target.baseURI,
           themeData: event.target.getAttribute("data-browsertheme"),
         });
         break;
       }
@@ -918,17 +918,17 @@ var LightWeightThemeWebInstallListener =
                            {baseURI: event.target.baseURI});
           this._resetPreviewWindow();
         }
         break;
       }
     }
   },
 
-  _resetPreviewWindow: function() {
+  _resetPreviewWindow() {
     this._previewWindow.removeEventListener("pagehide", this, true);
     this._previewWindow = null;
   }
 };
 
 LightWeightThemeWebInstallListener.init();
 
 function disableSetDesktopBackground(aTarget) {
@@ -977,21 +977,21 @@ addMessageListener("ContextMenu:SetAsDes
   }
 
   if (disable)
     sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result", { disable });
 });
 
 var PageInfoListener = {
 
-  init: function() {
+  init() {
     addMessageListener("PageInfo:getData", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     let strings = message.data.strings;
     let window;
     let document;
 
     let frameOuterWindowID = message.data.frameOuterWindowID;
 
     // If inside frame then get the frame's window and document.
     if (frameOuterWindowID) {
@@ -1012,58 +1012,58 @@ var PageInfoListener = {
                         imageInfo: this.getImageInfo(imageElement)};
 
     sendAsyncMessage("PageInfo:data", pageInfoData);
 
     // Separate step so page info dialog isn't blank while waiting for this to finish.
     this.getMediaInfo(document, window, strings);
   },
 
-  getImageInfo: function(imageElement) {
+  getImageInfo(imageElement) {
     let imageInfo = null;
     if (imageElement) {
       imageInfo = {
         currentSrc: imageElement.currentSrc,
         width: imageElement.width,
         height: imageElement.height,
         imageText: imageElement.title || imageElement.alt
       };
     }
     return imageInfo;
   },
 
-  getMetaInfo: function(document) {
+  getMetaInfo(document) {
     let metaViewRows = [];
 
     // Get the meta tags from the page.
     let metaNodes = document.getElementsByTagName("meta");
 
     for (let metaNode of metaNodes) {
       metaViewRows.push([metaNode.name || metaNode.httpEquiv || metaNode.getAttribute("property"),
                         metaNode.content]);
     }
 
     return metaViewRows;
   },
 
-  getWindowInfo: function(window) {
+  getWindowInfo(window) {
     let windowInfo = {};
     windowInfo.isTopWindow = window == window.top;
 
     let hostName = null;
     try {
       hostName = window.location.host;
     }
     catch (exception) { }
 
     windowInfo.hostName = hostName;
     return windowInfo;
   },
 
-  getDocumentInfo: function(document) {
+  getDocumentInfo(document) {
     let docInfo = {};
     docInfo.title = document.title;
     docInfo.location = document.location.toString();
     docInfo.referrer = document.referrer;
     docInfo.compatMode = document.compatMode;
     docInfo.contentType = document.contentType;
     docInfo.characterSet = document.characterSet;
     docInfo.lastModified = document.lastModified;
@@ -1074,17 +1074,17 @@ var PageInfoListener = {
     documentURIObject.originCharset = document.documentURIObject.originCharset;
     docInfo.documentURIObject = documentURIObject;
 
     docInfo.isContentWindowPrivate = PrivateBrowsingUtils.isContentWindowPrivate(content);
 
     return docInfo;
   },
 
-  getFeedsInfo: function(document, strings) {
+  getFeedsInfo(document, strings) {
     let feeds = [];
     // Get the feeds from the page.
     let linkNodes = document.getElementsByTagName("link");
     let length = linkNodes.length;
     for (let i = 0; i < length; i++) {
       let link = linkNodes[i];
       if (!link.href) {
         continue;
@@ -1105,37 +1105,37 @@ var PageInfoListener = {
           feeds.push([link.title, type, link.href]);
         }
       }
     }
     return feeds;
   },
 
   // Only called once to get the media tab's media elements from the content page.
-  getMediaInfo: function(document, window, strings)
+  getMediaInfo(document, window, strings)
   {
     let frameList = this.goThroughFrames(document, window);
     Task.spawn(() => this.processFrames(document, frameList, strings));
   },
 
-  goThroughFrames: function(document, window)
+  goThroughFrames(document, window)
   {
     let frameList = [document];
     if (window && window.frames.length > 0) {
       let num = window.frames.length;
       for (let i = 0; i < num; i++) {
         // Recurse through the frames.
         frameList.concat(this.goThroughFrames(window.frames[i].document,
                                               window.frames[i]));
       }
     }
     return frameList;
   },
 
-  processFrames: function*(document, frameList, strings)
+  *processFrames(document, frameList, strings)
   {
     let nodeCount = 0;
     for (let doc of frameList) {
       let iterator = doc.createTreeWalker(doc, content.NodeFilter.SHOW_ELEMENT);
 
       // Goes through all the elements on the doc. imageViewRows takes only the media elements.
       while (iterator.nextNode()) {
         let mediaItems = this.getMediaItems(document, strings, iterator.currentNode);
@@ -1150,17 +1150,17 @@ var PageInfoListener = {
           yield new Promise(resolve => setTimeout(resolve, 10));
         }
       }
     }
     // Send that page info media fetching has finished.
     sendAsyncMessage("PageInfo:mediaData", {isComplete: true});
   },
 
-  getMediaItems: function(document, strings, elem)
+  getMediaItems(document, strings, elem)
   {
     // Check for images defined in CSS (e.g. background, borders)
     let computedStyle = elem.ownerGlobal.getComputedStyle(elem);
     // A node can have multiple media items associated with it - for example,
     // multiple background images.
     let mediaItems = [];
 
     let addImage = (url, type, alt, el, isBg) => {
@@ -1236,17 +1236,17 @@ var PageInfoListener = {
     return mediaItems;
   },
 
   /**
    * Set up a JSON element object with all the instanceOf and other infomation that
    * makePreview in pageInfo.js uses to figure out how to display the preview.
    */
 
-  serializeElementInfo: function(document, url, type, alt, item, isBG)
+  serializeElementInfo(document, url, type, alt, item, isBG)
   {
     let result = {};
 
     let imageText;
     if (!isBG &&
         !(item instanceof content.SVGImageElement) &&
         !(document instanceof content.ImageDocument)) {
       imageText = item.title || item.alt;
@@ -1317,17 +1317,17 @@ var PageInfoListener = {
     result.baseURI = item.baseURI;
 
     return result;
   },
 
   // Other Misc Stuff
   // Modified from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html
   // parse a node to extract the contents of the node
-  getValueText: function(node)
+  getValueText(node)
   {
 
     let valueText = "";
 
     // Form input elements don't generally contain information that is useful to our callers, so return nothing.
     if (node instanceof content.HTMLInputElement ||
         node instanceof content.HTMLSelectElement ||
         node instanceof content.HTMLTextAreaElement) {
@@ -1357,17 +1357,17 @@ var PageInfoListener = {
       }
     }
 
     return this.stripWS(valueText);
   },
 
   // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html.
   // Traverse the tree in search of an img or area element and grab its alt tag.
-  getAltText: function(node)
+  getAltText(node)
   {
     let altText = "";
 
     if (node.alt) {
       return node.alt;
     }
     let length = node.childNodes.length;
     for (let i = 0; i < length; i++) {
@@ -1375,17 +1375,17 @@ var PageInfoListener = {
         return altText;
       }
     }
     return "";
   },
 
   // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html.
   // Strip leading and trailing whitespace, and replace multiple consecutive whitespace characters with a single space.
-  stripWS: function(text)
+  stripWS(text)
   {
     let middleRE = /\s+/g;
     let endRE = /(^\s+)|(\s+$)/g;
 
     text = text.replace(middleRE, " ");
     return text.replace(endRE, "");
   }
 };
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -85,17 +85,17 @@ ContentSearchUIController.prototype = {
       icon = this._getFaviconURIFromBuffer(engine.iconBuffer);
     }
     else {
       icon = this._getImageURIForCurrentResolution(
         "chrome://mozapps/skin/places/defaultFavicon.png");
     }
     this._defaultEngine = {
       name: engine.name,
-      icon: icon,
+      icon,
     };
     this._updateDefaultEngineHeader();
 
     if (engine && document.activeElement == this.input) {
       this._speculativeConnect();
     }
   },
 
@@ -184,70 +184,70 @@ ContentSearchUIController.prototype = {
     }
     return this.defaultEngine.name;
   },
 
   get numSuggestions() {
     return this._suggestionsList.children.length;
   },
 
-  selectAndUpdateInput: function(idx) {
+  selectAndUpdateInput(idx) {
     this.selectedIndex = idx;
     let newValue = this.suggestionAtIndex(idx) || this._stickyInputValue;
     // Setting the input value when the value has not changed commits the current
     // IME composition, which we don't want to do.
     if (this.input.value != newValue) {
       this.input.value = newValue;
     }
     this._updateSearchWithHeader();
   },
 
-  suggestionAtIndex: function(idx) {
+  suggestionAtIndex(idx) {
     let row = this._suggestionsList.children[idx];
     return row ? row.textContent : null;
   },
 
-  deleteSuggestionAtIndex: function(idx) {
+  deleteSuggestionAtIndex(idx) {
     // Only form history suggestions can be deleted.
     if (this.isFormHistorySuggestionAtIndex(idx)) {
       let suggestionStr = this.suggestionAtIndex(idx);
       this._sendMsg("RemoveFormHistoryEntry", suggestionStr);
       this._suggestionsList.children[idx].remove();
       this.selectAndUpdateInput(-1);
     }
   },
 
-  isFormHistorySuggestionAtIndex: function(idx) {
+  isFormHistorySuggestionAtIndex(idx) {
     let row = this._suggestionsList.children[idx];
     return row && row.classList.contains("formHistory");
   },
 
-  addInputValueToFormHistory: function() {
+  addInputValueToFormHistory() {
     this._sendMsg("AddFormHistoryEntry", this.input.value);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     this["_on" + event.type[0].toUpperCase() + event.type.substr(1)](event);
   },
 
-  _onCommand: function(aEvent) {
+  _onCommand(aEvent) {
     if (this.selectedButtonIndex == this._oneOffButtons.length) {
       // Settings button was selected.
       this._sendMsg("ManageEngines");
       return;
     }
 
     this.search(aEvent);
 
     if (aEvent) {
       aEvent.preventDefault();
     }
   },
 
-  search: function(aEvent) {
+  search(aEvent) {
     if (!this.defaultEngine) {
       return; // Not initialized yet.
     }
 
     let searchText = this.input;
     let searchTerms;
     if (this._table.hidden ||
         aEvent.originalTarget.id == "contentSearchDefaultEngineHeader" ||
@@ -286,30 +286,30 @@ ContentSearchUIController.prototype = {
         eventData.selection.kind = "key";
       }
     }
 
     this._sendMsg("Search", eventData);
     this.addInputValueToFormHistory();
   },
 
-  _onInput: function() {
+  _onInput() {
     if (!this.input.value) {
       this._stickyInputValue = "";
       this._hideSuggestions();
     }
     else if (this.input.value != this._stickyInputValue) {
       // Only fetch new suggestions if the input value has changed.
       this._getSuggestions();
       this.selectAndUpdateInput(-1);
     }
     this._updateSearchWithHeader();
   },
 
-  _onKeypress: function(event) {
+  _onKeypress(event) {
     let selectedIndexDelta = 0;
     let selectedSuggestionDelta = 0;
     let selectedOneOffDelta = 0;
 
     switch (event.keyCode) {
     case event.DOM_VK_UP:
       if (this._table.hidden) {
         return;
@@ -446,92 +446,92 @@ ContentSearchUIController.prototype = {
       this.selectedButtonIndex = newSelectedIndex;
     }
 
     // Prevent the input's caret from moving.
     event.preventDefault();
   },
 
   _currentEngineIndex: -1,
-  _cycleCurrentEngine: function(aReverse) {
+  _cycleCurrentEngine(aReverse) {
     if ((this._currentEngineIndex == this._engines.length - 1 && !aReverse) ||
         (this._currentEngineIndex == 0 && aReverse)) {
       return;
     }
     this._currentEngineIndex += aReverse ? -1 : 1;
     let engineName = this._engines[this._currentEngineIndex].name;
     this._sendMsg("SetCurrentEngine", engineName);
   },
 
-  _onFocus: function() {
+  _onFocus() {
     if (this._mousedown) {
       return;
     }
     // When the input box loses focus to something in our table, we refocus it
     // immediately. This causes the focus highlight to flicker, so we set a
     // custom attribute which consumers should use for focus highlighting. This
     // attribute is removed only when we do not immediately refocus the input
     // box, thus eliminating flicker.
     this.input.setAttribute("keepfocus", "true");
     this._speculativeConnect();
   },
 
-  _onBlur: function() {
+  _onBlur() {
     if (this._mousedown) {
       // At this point, this.input has lost focus, but a new element has not yet
       // received it. If we re-focus this.input directly, the new element will
       // steal focus immediately, so we queue it instead.
       setTimeout(() => this.input.focus(), 0);
       return;
     }
     this.input.removeAttribute("keepfocus");
     this._hideSuggestions();
   },
 
-  _onMousemove: function(event) {
+  _onMousemove(event) {
     let idx = this._indexOfTableItem(event.target);
     if (idx >= this.numSuggestions) {
       this.selectedButtonIndex = idx - this.numSuggestions;
       return;
     }
     this.selectedIndex = idx;
   },
 
-  _onMouseup: function(event) {
+  _onMouseup(event) {
     if (event.button == 2) {
       return;
     }
     this._onCommand(event);
   },
 
-  _onMouseout: function(event) {
+  _onMouseout(event) {
     // We only deselect one-off buttons and the settings button when they are
     // moused out.
     let idx = this._indexOfTableItem(event.originalTarget);
     if (idx >= this.numSuggestions) {
       this.selectedButtonIndex = -1;
     }
   },
 
-  _onClick: function(event) {
+  _onClick(event) {
     this._onMouseup(event);
   },
 
-  _onContentSearchService: function(event) {
+  _onContentSearchService(event) {
     let methodName = "_onMsg" + event.detail.type;
     if (methodName in this) {
       this[methodName](event.detail.data);
     }
   },
 
-  _onMsgFocusInput: function(event) {
+  _onMsgFocusInput(event) {
     this.input.focus();
   },
 
-  _onMsgSuggestions: function(suggestions) {
+  _onMsgSuggestions(suggestions) {
     // Ignore the suggestions if their search string or engine doesn't match
     // ours.  Due to the async nature of message passing, this can easily happen
     // when the user types quickly.
     if (this._stickyInputValue != suggestions.searchString ||
         this.defaultEngine.name != suggestions.engineName) {
       return;
     }
 
@@ -576,84 +576,84 @@ ContentSearchUIController.prototype = {
       this.input.setAttribute("aria-expanded", "true");
       this._originalDefaultEngine = {
         name: this.defaultEngine.name,
         icon: this.defaultEngine.icon,
       };
     }
   },
 
-  _onMsgSuggestionsCancelled: function() {
+  _onMsgSuggestionsCancelled() {
     if (!this._table.hidden) {
       this._hideSuggestions();
     }
   },
 
-  _onMsgState: function(state) {
+  _onMsgState(state) {
     this.engines = state.engines;
     // No point updating the default engine (and the header) if there's no change.
     if (this.defaultEngine &&
         this.defaultEngine.name == state.currentEngine.name &&
         this.defaultEngine.icon == state.currentEngine.icon) {
       return;
     }
     this.defaultEngine = state.currentEngine;
   },
 
-  _onMsgCurrentState: function(state) {
+  _onMsgCurrentState(state) {
     this._onMsgState(state);
   },
 
-  _onMsgCurrentEngine: function(engine) {
+  _onMsgCurrentEngine(engine) {
     this.defaultEngine = engine;
     this._pendingOneOffRefresh = true;
   },
 
-  _onMsgStrings: function(strings) {
+  _onMsgStrings(strings) {
     this._strings = strings;
     this._updateDefaultEngineHeader();
     this._updateSearchWithHeader();
     document.getElementById("contentSearchSettingsButton").textContent =
       this._strings.searchSettings;
     this.input.setAttribute("placeholder", this._strings.searchPlaceholder);
   },
 
-  _updateDefaultEngineHeader: function() {
+  _updateDefaultEngineHeader() {
     let header = document.getElementById("contentSearchDefaultEngineHeader");
     header.firstChild.setAttribute("src", this.defaultEngine.icon);
     if (!this._strings) {
       return;
     }
     while (header.firstChild.nextSibling) {
       header.firstChild.nextSibling.remove();
     }
     header.appendChild(document.createTextNode(
       this._strings.searchHeader.replace("%S", this.defaultEngine.name)));
   },
 
-  _updateSearchWithHeader: function() {
+  _updateSearchWithHeader() {
     if (!this._strings) {
       return;
     }
     let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
     if (this.input.value) {
       searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
       searchWithHeader.querySelector('.contentSearchSearchWithHeaderSearchText').textContent = this.input.value;
     } else {
       searchWithHeader.textContent = this._strings.searchWithHeader;
     }
   },
 
-  _speculativeConnect: function() {
+  _speculativeConnect() {
     if (this.defaultEngine) {
       this._sendMsg("SpeculativeConnect", this.defaultEngine.name);
     }
   },
 
-  _makeTableRow: function(type, suggestionStr, currentRow, searchWords) {
+  _makeTableRow(type, suggestionStr, currentRow, searchWords) {
     let row = document.createElementNS(HTML_NS, "tr");
     row.dir = "auto";
     row.classList.add("contentSearchSuggestionRow");
     row.classList.add(type);
     row.setAttribute("role", "presentation");
     row.addEventListener("mousemove", this);
     row.addEventListener("mouseup", this);
 
@@ -680,78 +680,78 @@ ContentSearchUIController.prototype = {
       }
     }
 
     row.appendChild(entry);
     return row;
   },
 
   // Converts favicon array buffer into a data URI.
-  _getFaviconURIFromBuffer: function(buffer) {
+  _getFaviconURIFromBuffer(buffer) {
     let blob = new Blob([buffer]);
     return URL.createObjectURL(blob);
   },
 
   // Adds "@2x" to the name of the given PNG url for "retina" screens.
-  _getImageURIForCurrentResolution: function(uri) {
+  _getImageURIForCurrentResolution(uri) {
     if (window.devicePixelRatio > 1) {
       return uri.replace(/\.png$/, "@2x.png");
     }
     return uri;
   },
 
-  _getSearchEngines: function() {
+  _getSearchEngines() {
     this._sendMsg("GetState");
   },
 
-  _getStrings: function() {
+  _getStrings() {
     this._sendMsg("GetStrings");
   },
 
-  _getSuggestions: function() {
+  _getSuggestions() {
     this._stickyInputValue = this.input.value;
     if (this.defaultEngine) {
       this._sendMsg("GetSuggestions", {
         engineName: this.defaultEngine.name,
         searchString: this.input.value,
       });
     }
   },
 
-  _clearSuggestionRows: function() {
+  _clearSuggestionRows() {
     while (this._suggestionsList.firstElementChild) {
       this._suggestionsList.firstElementChild.remove();
     }
   },
 
-  _hideSuggestions: function() {
+  _hideSuggestions() {
     this.input.setAttribute("aria-expanded", "false");
     this.selectedIndex = -1;
     this.selectedButtonIndex = -1;
     this._currentEngineIndex = -1;
     this._table.hidden = true;
   },
 
-  _indexOfTableItem: function(elt) {
+  _indexOfTableItem(elt) {
     if (elt.classList.contains("contentSearchOneOffItem")) {
       return this.numSuggestions + this._oneOffButtons.indexOf(elt);
     }
     if (elt.classList.contains("contentSearchSettingsButton")) {
       return this.numSuggestions + this._oneOffButtons.length;
     }
     while (elt && elt.localName != "tr") {
       elt = elt.parentNode;
     }
     if (!elt) {
       throw new Error("Element is not a row");
     }
     return elt.rowIndex;
   },
 
-  _makeTable: function(id) {
+  _makeTable(id) {
     this._table = document.createElementNS(HTML_NS, "table");
     this._table.id = id;
     this._table.hidden = true;
     this._table.classList.add("contentSearchSuggestionTable");
     this._table.setAttribute("role", "presentation");
 
     // When the search input box loses focus, we want to immediately give focus
     // back to it if the blur was because the user clicked somewhere in the table.
@@ -810,17 +810,17 @@ ContentSearchUIController.prototype = {
     button.id = "contentSearchSettingsButton";
     button.addEventListener("click", this);
     button.addEventListener("mousemove", this);
     this._table.appendChild(button);
 
     return this._table;
   },
 
-  _setUpOneOffButtons: function() {
+  _setUpOneOffButtons() {
     // Sometimes we receive a CurrentEngine message from the ContentSearch service
     // before we've received a State message - i.e. before we have our engines.
     if (!this._engines) {
       return;
     }
 
     while (this._oneOffsTable.firstChild.nextSibling) {
       this._oneOffsTable.firstChild.nextSibling.remove();
@@ -891,20 +891,20 @@ ContentSearchUIController.prototype = {
       cell.appendChild(button);
       this._oneOffButtons.push(button);
     }
     row.appendChild(cell);
     this._oneOffsTable.appendChild(row);
     this._oneOffsTable.hidden = false;
   },
 
-  _sendMsg: function(type, data = null) {
+  _sendMsg(type, data = null) {
     dispatchEvent(new CustomEvent("ContentSearchClient", {
       detail: {
-        type: type,
-        data: data,
+        type,
+        data,
       },
     }));
   },
 };
 
 return ContentSearchUIController;
 })();
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -19,87 +19,87 @@ function pageInfoTreeView(treeid, copyco
   this.sortcol = -1;
   this.sortdir = false;
 }
 
 pageInfoTreeView.prototype = {
   set rowCount(c) { throw "rowCount is a readonly property"; },
   get rowCount() { return this.rows; },
 
-  setTree: function(tree)
+  setTree(tree)
   {
     this.tree = tree;
   },
 
-  getCellText: function(row, column)
+  getCellText(row, column)
   {
     // row can be null, but js arrays are 0-indexed.
     // colidx cannot be null, but can be larger than the number
     // of columns in the array. In this case it's the fault of
     // whoever typoed while calling this function.
     return this.data[row][column.index] || "";
   },
 
-  setCellValue: function(row, column, value)
+  setCellValue(row, column, value)
   {
   },
 
-  setCellText: function(row, column, value)
+  setCellText(row, column, value)
   {
     this.data[row][column.index] = value;
   },
 
-  addRow: function(row)
+  addRow(row)
   {
     this.rows = this.data.push(row);
     this.rowCountChanged(this.rows - 1, 1);
     if (this.selection.count == 0 && this.rowCount && !gImageElement) {
       this.selection.select(0);
     }
   },
 
-  addRows: function(rows)
+  addRows(rows)
   {
     for (let row of rows) {
       this.addRow(row);
     }
   },
 
-  rowCountChanged: function(index, count)
+  rowCountChanged(index, count)
   {
     this.tree.rowCountChanged(index, count);
   },
 
-  invalidate: function()
+  invalidate()
   {
     this.tree.invalidate();
   },
 
-  clear: function()
+  clear()
   {
     if (this.tree)
       this.tree.rowCountChanged(0, -this.rows);
     this.rows = 0;
     this.data = [ ];
   },
 
-  handleCopy: function(row)
+  handleCopy(row)
   {
     return (row < 0 || this.copycol < 0) ? "" : (this.data[row][this.copycol] || "");
   },
 
-  performActionOnRow: function(action, row)
+  performActionOnRow(action, row)
   {
     if (action == "copy") {
       var data = this.handleCopy(row)
       this.tree.treeBody.parentNode.setAttribute("copybuffer", data);
     }
   },
 
-  onPageMediaSort : function(columnname)
+  onPageMediaSort(columnname)
   {
     var tree = document.getElementById(this.treeid);
     var treecol = tree.columns.getNamedColumn(columnname);
 
     this.sortdir =
       gTreeUtils.sort(
         tree,
         this,
@@ -116,39 +116,39 @@ pageInfoTreeView.prototype = {
     });
     treecol.element.setAttribute("sortActive", "true");
     treecol.element.setAttribute("sortDirection", this.sortdir ?
                                                   "ascending" : "descending");
 
     this.sortcol = treecol.index;
   },
 
-  getRowProperties: function(row) { return ""; },
-  getCellProperties: function(row, column) { return ""; },
-  getColumnProperties: function(column) { return ""; },
-  isContainer: function(index) { return false; },
-  isContainerOpen: function(index) { return false; },
-  isSeparator: function(index) { return false; },
-  isSorted: function() { return this.sortcol > -1 },
-  canDrop: function(index, orientation) { return false; },
-  drop: function(row, orientation) { return false; },
-  getParentIndex: function(index) { return 0; },
-  hasNextSibling: function(index, after) { return false; },
-  getLevel: function(index) { return 0; },
-  getImageSrc: function(row, column) { },
-  getProgressMode: function(row, column) { },
-  getCellValue: function(row, column) { },
-  toggleOpenState: function(index) { },
-  cycleHeader: function(col) { },
-  selectionChanged: function() { },
-  cycleCell: function(row, column) { },
-  isEditable: function(row, column) { return false; },
-  isSelectable: function(row, column) { return false; },
-  performAction: function(action) { },
-  performActionOnCell: function(action, row, column) { }
+  getRowProperties(row) { return ""; },
+  getCellProperties(row, column) { return ""; },
+  getColumnProperties(column) { return ""; },
+  isContainer(index) { return false; },
+  isContainerOpen(index) { return false; },
+  isSeparator(index) { return false; },
+  isSorted() { return this.sortcol > -1 },
+  canDrop(index, orientation) { return false; },
+  drop(row, orientation) { return false; },
+  getParentIndex(index) { return 0; },
+  hasNextSibling(index, after) { return false; },
+  getLevel(index) { return 0; },
+  getImageSrc(row, column) { },
+  getProgressMode(row, column) { },
+  getCellValue(row, column) { },
+  toggleOpenState(index) { },
+  cycleHeader(col) { },
+  selectionChanged() { },
+  cycleCell(row, column) { },
+  isEditable(row, column) { return false; },
+  isSelectable(row, column) { return false; },
+  performAction(action) { },
+  performActionOnCell(action, row, column) { }
 };
 
 // mmm, yummy. global variables.
 var gDocInfo = null;
 var gImageElement = null;
 
 // column number to help using the data array
 const COL_IMAGE_ADDRESS = 0;
@@ -354,17 +354,17 @@ function loadPageInfo(frameOuterWindowID
   gStrings["application/rss+xml"]  = gBundle.getString("feedRss");
   gStrings["application/atom+xml"] = gBundle.getString("feedAtom");
   gStrings["text/xml"]             = gBundle.getString("feedXML");
   gStrings["application/xml"]      = gBundle.getString("feedXML");
   gStrings["application/rdf+xml"]  = gBundle.getString("feedXML");
 
   // Look for pageInfoListener in content.js. Sends message to listener with arguments.
   mm.sendAsyncMessage("PageInfo:getData", {strings: gStrings,
-                      frameOuterWindowID: frameOuterWindowID},
+                      frameOuterWindowID},
                       { imageElement });
 
   let pageInfoData;
 
   // Get initial pageInfoData needed to display the general, feeds, permission and security tabs.
   mm.addMessageListener("PageInfo:data", function onmessage(message) {
     mm.removeMessageListener("PageInfo:data", onmessage);
     pageInfoData = message.data;
@@ -512,20 +512,20 @@ function toggleGroupbox(id)
       elt.flex = 0;
     }
   }
 }
 
 function openCacheEntry(key, cb)
 {
   var checkCacheListener = {
-    onCacheEntryCheck: function(entry, appCache) {
+    onCacheEntryCheck(entry, appCache) {
       return Components.interfaces.nsICacheEntryOpenCallback.ENTRY_WANTED;
     },
-    onCacheEntryAvailable: function(entry, isNew, appCache, status) {
+    onCacheEntryAvailable(entry, isNew, appCache, status) {
       cb(entry);
     }
   };
   diskStorage.asyncOpenURI(Services.io.newURI(key, null, null), "", nsICacheStorage.OPEN_READONLY, checkCacheListener);
 }
 
 function makeGeneralTab(metaViewRows, docInfo)
 {
@@ -999,17 +999,17 @@ function makeBlockImage(url)
       checkbox.checked = perm == nsIPermissionManager.DENY_ACTION;
     }
     else
       checkbox.hidden = true;
   }
 }
 
 var imagePermissionObserver = {
-  observe: function(aSubject, aTopic, aData)
+  observe(aSubject, aTopic, aData)
   {
     if (document.getElementById("mediaPreviewBox").collapsed)
       return;
 
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
       if (permission.type == "image") {
         var imageTree = document.getElementById("imagetree");
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -15,17 +15,17 @@ var gUsageRequest;
 var gPermissions = SitePermissions.listPermissions().sort((a, b) => {
   let firstLabel = SitePermissions.getPermissionLabel(a);
   let secondLabel = SitePermissions.getPermissionLabel(b);
   return firstLabel.localeCompare(secondLabel);
 });
 gPermissions.push("plugins");
 
 var permissionObserver = {
-  observe: function(aSubject, aTopic, aData)
+  observe(aSubject, aTopic, aData)
   {
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
       if (permission.matchesURI(gPermURI, true)) {
         if (gPermissions.indexOf(permission.type) > -1)
           initRow(permission.type);
         else if (permission.type.startsWith("plugin"))
           setPluginsRadioState();
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -4,28 +4,28 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 Components.utils.import("resource://gre/modules/BrowserUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper",
                                   "resource://gre/modules/LoginHelper.jsm");
 
 var security = {
-  init: function(uri, windowInfo) {
+  init(uri, windowInfo) {
     this.uri = uri;
     this.windowInfo = windowInfo;
   },
 
   // Display the server certificate (static)
-  viewCert : function() {
+  viewCert() {
     var cert = security._cert;
     viewCertHelper(window, cert);
   },
 
-  _getSecurityInfo : function() {
+  _getSecurityInfo() {
     const nsISSLStatusProvider = Components.interfaces.nsISSLStatusProvider;
     const nsISSLStatus = Components.interfaces.nsISSLStatus;
 
     // We don't have separate info for a frame, return null until further notice
     // (see bug 138479)
     if (!this.windowInfo.isTopWindow)
       return null;
 
@@ -49,25 +49,25 @@ var security = {
 
     if (!isInsecure && status) {
       status.QueryInterface(nsISSLStatus);
       var cert = status.serverCert;
       var issuerName =
         this.mapIssuerOrganization(cert.issuerOrganization) || cert.issuerName;
 
       var retval = {
-        hostName : hostName,
+        hostName,
         cAName : issuerName,
         encryptionAlgorithm : undefined,
         encryptionStrength : undefined,
         version: undefined,
-        isBroken : isBroken,
-        isMixed : isMixed,
-        isEV : isEV,
-        cert : cert,
+        isBroken,
+        isMixed,
+        isEV,
+        cert,
         certificateTransparency : undefined
       };
 
       var version;
       try {
         retval.encryptionAlgorithm = status.cipherName;
         retval.encryptionStrength = status.secretKeyLength;
         version = status.protocolVersion;
@@ -112,52 +112,52 @@ var security = {
         case nsISSLStatus.CERTIFICATE_TRANSPARENCY_INVALID:
           retval.certificateTransparency = "Invalid";
           break;
       }
 
       return retval;
     }
     return {
-      hostName : hostName,
+      hostName,
       cAName : "",
       encryptionAlgorithm : "",
       encryptionStrength : 0,
       version: "",
-      isBroken : isBroken,
-      isMixed : isMixed,
-      isEV : isEV,
+      isBroken,
+      isMixed,
+      isEV,
       cert : null,
       certificateTransparency : null
     };
   },
 
   // Find the secureBrowserUI object (if present)
-  _getSecurityUI : function() {
+  _getSecurityUI() {
     if (window.opener.gBrowser)
       return window.opener.gBrowser.securityUI;
     return null;
   },
 
   // Interface for mapping a certificate issuer organization to
   // the value to be displayed.
   // Bug 82017 - this implementation should be moved to pipnss C++ code
-  mapIssuerOrganization: function(name) {
+  mapIssuerOrganization(name) {
     if (!name) return null;
 
     if (name == "RSA Data Security, Inc.") return "Verisign, Inc.";
 
     // No mapping required
     return name;
   },
 
   /**
    * Open the cookie manager window
    */
-  viewCookies : function()
+  viewCookies()
   {
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     var win = wm.getMostRecentWindow("Browser:Cookies");
     var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"].
                       getService(Components.interfaces.nsIEffectiveTLDService);
 
     var eTLD;
@@ -176,17 +176,17 @@ var security = {
     else
       window.openDialog("chrome://browser/content/preferences/cookies.xul",
                         "Browser:Cookies", "", {filterString : eTLD});
   },
 
   /**
    * Open the login manager window
    */
-  viewPasswords : function() {
+  viewPasswords() {
     LoginHelper.openPasswordManager(window, this._getSecurityInfo().hostName);
   },
 
   _cert : null
 };
 
 function securityOnLoad(uri, windowInfo) {
   security.init(uri, windowInfo);
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -33,24 +33,24 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * to the system.
  */
 const YIELD_PERIOD = 10;
 
 function Sanitizer() {
 }
 Sanitizer.prototype = {
   // warning to the caller: this one may raise an exception (e.g. bug #265028)
-  clearItem: function(aItemName)
+  clearItem(aItemName)
   {
     this.items[aItemName].clear();
   },
 
   prefDomain: "",
 
-  getNameFromPreference: function(aPreferenceName)
+  getNameFromPreference(aPreferenceName)
   {
     return aPreferenceName.substr(this.prefDomain.length);
   },
 
   /**
    * Deletes privacy sensitive data in a batch, according to user preferences.
    * Returns a promise which is resolved if no errors occurred.  If an error
    * occurs, a message is reported to the console and all other items are still
@@ -511,27 +511,27 @@ Sanitizer.prototype = {
         if (seenException) {
           throw seenException;
         }
       })
     },
 
     openWindows: {
       privateStateForNewWindow: "non-private",
-      _canCloseWindow: function(aWindow) {
+      _canCloseWindow(aWindow) {
         if (aWindow.CanCloseWindow()) {
           // We already showed PermitUnload for the window, so let's
           // make sure we don't do it again when we actually close the
           // window.
           aWindow.skipNextCanClose = true;
           return true;
         }
         return false;
       },
-      _resetAllWindowClosures: function(aWindowList) {
+      _resetAllWindowClosures(aWindowList) {
         for (let win of aWindowList) {
           win.skipNextCanClose = false;
         }
       },
       clear: Task.async(function* () {
         // NB: this closes all *browser* windows, not other windows like the library, about window,
         // browser console, etc.
 
--- a/browser/base/content/social-content.js
+++ b/browser/base/content/social-content.js
@@ -109,17 +109,17 @@ const SocialErrorListener = {
       // Unable to access frame.docShell here. This is our own frame and doesn't
       // provide reload, so we'll just set the src.
       frame.setAttribute("src", url);
     } else {
       let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
       webNav.loadURI(url, null, null, null, null);
     }
     sendAsyncMessage("Social:ErrorPageNotify", {
-        origin: origin,
+        origin,
         url: src
     });
   },
 
   onStateChange(aWebProgress, aRequest, aState, aStatus) {
     let failure = false;
     if ((aState & Ci.nsIWebProgressListener.STATE_IS_REQUEST))
       return;
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -18,50 +18,50 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
   XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
                                     "resource://gre/modules/CloudSync.jsm");
 }
 
 var RemoteTabViewer = {
   _tabsList: null,
 
-  init: function() {
+  init() {
     Services.obs.addObserver(this, "weave:service:login:finish", false);
     Services.obs.addObserver(this, "weave:engine:sync:finish", false);
 
     Services.obs.addObserver(this, "cloudsync:tabs:update", false);
 
     this._tabsList = document.getElementById("tabsList");
 
     this.buildList(true);
   },
 
-  uninit: function() {
+  uninit() {
     Services.obs.removeObserver(this, "weave:service:login:finish");
     Services.obs.removeObserver(this, "weave:engine:sync:finish");
 
     Services.obs.removeObserver(this, "cloudsync:tabs:update");
   },
 
-  createItem: function(attrs) {
+  createItem(attrs) {
     let item = document.createElement("richlistitem");
 
     // Copy the attributes from the argument into the item.
     for (let attr in attrs) {
       item.setAttribute(attr, attrs[attr]);
     }
 
     if (attrs["type"] == "tab") {
       item.label = attrs.title != "" ? attrs.title : attrs.url;
     }
 
     return item;
   },
 
-  filterTabs: function(event) {
+  filterTabs(event) {
     let val = event.target.value.toLowerCase();
     let numTabs = this._tabsList.getRowCount();
     let clientTabs = 0;
     let currentClient = null;
 
     for (let i = 0; i < numTabs; i++) {
       let item = this._tabsList.getItemAtIndex(i);
       let hide = false;
@@ -84,48 +84,48 @@ var RemoteTabViewer = {
       }
       item.hidden = hide;
     }
     if (clientTabs == 0) {
       currentClient.hidden = true;
     }
   },
 
-  openSelected: function() {
+  openSelected() {
     let items = this._tabsList.selectedItems;
     let urls = [];
     for (let i = 0; i < items.length; i++) {
       if (items[i].getAttribute("type") == "tab") {
         urls.push(items[i].getAttribute("url"));
         let index = this._tabsList.getIndexOfItem(items[i]);
         this._tabsList.removeItemAt(index);
       }
     }
     if (urls.length) {
       getTopWin().gBrowser.loadTabs(urls);
       this._tabsList.clearSelection();
     }
   },
 
-  bookmarkSingleTab: function() {
+  bookmarkSingleTab() {
     let item = this._tabsList.selectedItems[0];
     let uri = Weave.Utils.makeURI(item.getAttribute("url"));
     let title = item.getAttribute("title");
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "bookmark"
-                                     , uri: uri
-                                     , title: title
+                                     , uri
+                                     , title
                                      , hiddenRows: [ "description"
                                                    , "location"
                                                    , "loadInSidebar"
                                                    , "keyword" ]
                                      }, window.top);
   },
 
-  bookmarkSelectedTabs: function() {
+  bookmarkSelectedTabs() {
     let items = this._tabsList.selectedItems;
     let URIs = [];
     for (let i = 0; i < items.length; i++) {
       if (items[i].getAttribute("type") == "tab") {
         let uri = Weave.Utils.makeURI(items[i].getAttribute("url"));
         if (!uri) {
           continue;
         }
@@ -137,33 +137,33 @@ var RemoteTabViewer = {
       PlacesUIUtils.showBookmarkDialog({ action: "add"
                                        , type: "folder"
                                        , URIList: URIs
                                        , hiddenRows: [ "description" ]
                                        }, window.top);
     }
   },
 
-  getIcon: function(iconUri, defaultIcon) {
+  getIcon(iconUri, defaultIcon) {
     try {
       let iconURI = Weave.Utils.makeURI(iconUri);
       return PlacesUtils.favicons.getFaviconLinkForIcon(iconURI).spec;
     } catch (ex) {
       // Do nothing.
     }
 
     // Just give the provided default icon or the system's default.
     return defaultIcon || PlacesUtils.favicons.defaultFavicon.spec;
   },
 
   _waitingForBuildList: false,
 
   _buildListRequested: false,
 
-  buildList: function(forceSync) {
+  buildList(forceSync) {
     if (this._waitingForBuildList) {
       this._buildListRequested = true;
       return;
     }
 
     this._waitingForBuildList = true;
     this._buildListRequested = false;
 
@@ -187,29 +187,29 @@ var RemoteTabViewer = {
     if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
       this._generateCloudSyncTabList()
           .then(complete, complete);
     } else {
       complete();
     }
   },
 
-  _clearTabList: function() {
+  _clearTabList() {
     let list = this._tabsList;
 
     // Clear out existing richlistitems.
     let count = list.getRowCount();
     if (count > 0) {
       for (let i = count - 1; i >= 0; i--) {
         list.removeItemAt(i);
       }
     }
   },
 
-  _generateWeaveTabList: function() {
+  _generateWeaveTabList() {
     let engine = Weave.Service.engineManager.get("tabs");
     let list = this._tabsList;
 
     let seenURLs = new Set();
     let localURLs = engine.getOpenURLs();
 
     for (let [, client] of Object.entries(engine.getAllClients())) {
       // Create the client node, but don't add it in-case we don't show any tabs
@@ -231,26 +231,26 @@ var RemoteTabViewer = {
           let clientEnt = this.createItem(attrs);
           list.appendChild(clientEnt);
           appendClient = false;
           clientEnt.disabled = true;
         }
         let attrs = {
           type:  "tab",
           title: title || url,
-          url:   url,
+          url,
           icon:  this.getIcon(icon),
         }
         let tab = this.createItem(attrs);
         list.appendChild(tab);
       }, this);
     }
   },
 
-  _generateCloudSyncTabList: function() {
+  _generateCloudSyncTabList() {
     let updateTabList = function(remoteTabs) {
       let list = this._tabsList;
 
       for (let client of remoteTabs) {
         let clientAttrs = {
           type: "client",
           clientName: client.name,
         };
@@ -270,17 +270,17 @@ var RemoteTabViewer = {
         }
       }
     }.bind(this);
 
     return CloudSync().tabs.getRemoteTabs()
                            .then(updateTabList, Promise.reject.bind(Promise));
   },
 
-  adjustContextMenu: function(event) {
+  adjustContextMenu(event) {
     let mode = "all";
     switch (this._tabsList.selectedItems.length) {
       case 0:
         break;
       case 1:
         mode = "single"
         break;
       default:
@@ -295,17 +295,17 @@ var RemoteTabViewer = {
       if (showFor) {
         el.hidden = showFor != mode && showFor != "all";
       }
 
       el = el.nextSibling;
     }
   },
 
-  _refetchTabs: function(force) {
+  _refetchTabs(force) {
     if (!force) {
       // Don't bother refetching tabs if we already did so recently
       let lastFetch = 0;
       try {
         lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch");
       }
       catch (e) {
         /* Just use the default value of 0 */
@@ -320,17 +320,17 @@ var RemoteTabViewer = {
     // Ask Sync to just do the tabs engine if it can.
     Weave.Service.sync(["tabs"]);
     Services.prefs.setIntPref("services.sync.lastTabFetch",
                               Math.floor(Date.now() / 1000));
 
     return true;
   },
 
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     switch (topic) {
       case "weave:service:login:finish":
         // A login has finished, which means that a Sync is about to start and
         // we will eventually get to the "tabs" engine - but try and force the
         // tab engine to sync first by passing |true| for the forceSync param.
         this.buildList(true);
         break;
       case "weave:engine:sync:finish":
@@ -341,17 +341,17 @@ var RemoteTabViewer = {
         }
         break;
       case "cloudsync:tabs:update":
         this.buildList(false);
         break;
     }
   },
 
-  handleClick: function(event) {
+  handleClick(event) {
     if (event.target.getAttribute("type") != "tab") {
       return;
     }
 
     if (event.button == 1) {
       let url = event.target.getAttribute("url");
       openUILink(url, event);
       let index = this._tabsList.getIndexOfItem(event.target);
--- a/browser/base/content/sync/genericChange.js
+++ b/browser/base/content/sync/genericChange.js
@@ -131,28 +131,28 @@ var Change = {
     this._dialog.getButton("finish").disabled = !error;
     document.getElementById("printSyncKeyButton").disabled = !error;
     document.getElementById("saveSyncKeyButton").disabled = !error;
 
     if (state == "success")
       window.setTimeout(window.close, 1500);
   },
 
-  onDialogAccept: function() {
+  onDialogAccept() {
     switch (this._dialogType) {
       case "UpdatePassphrase":
       case "ResetPassphrase":
         return this.doChangePassphrase();
       case "ChangePassword":
         return this.doChangePassword();
     }
     return undefined;
   },
 
-  doGeneratePassphrase: function() {
+  doGeneratePassphrase() {
     let passphrase = Weave.Utils.generatePassphrase();
     this._passphraseBox.value = Weave.Utils.hyphenatePassphrase(passphrase);
     this._dialog.getButton("finish").disabled = false;
   },
 
   doChangePassphrase: function Change_doChangePassphrase() {
     let pp = Weave.Utils.normalizePassphrase(this._passphraseBox.value);
     if (this._updatingPassphrase) {
@@ -196,17 +196,17 @@ var Change = {
         this._updateStatus("change.password.status.success", "success");
       else
         this._updateStatus("change.password.status.error", "error");
     }
 
     return false;
   },
 
-  validate: function(event) {
+  validate(event) {
     let valid = false;
     let errorString = "";
 
     if (this._dialogType == "ChangePassword") {
       if (this._currentPasswordInvalid)
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox);
       else
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox, this._secondBox);
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -56,17 +56,17 @@ var gSyncSetup = {
   },
 
   get _usingMainServers() {
     if (this._settingUpNew)
       return document.getElementById("server").selectedIndex == 0;
     return document.getElementById("existingServer").selectedIndex == 0;
   },
 
-  init: function() {
+  init() {
     let obs = [
       ["weave:service:change-passphrase", "onResetPassphrase"],
       ["weave:service:login:start",       "onLoginStart"],
       ["weave:service:login:error",       "onLoginEnd"],
       ["weave:service:login:finish",      "onLoginEnd"]];
 
     // Add the observers now and remove them on unload
     let self = this;
@@ -116,24 +116,24 @@ var gSyncSetup = {
     this._nextButtonLabel = this.wizard.getButton("next").label;
     this._nextButtonAccesskey = this.wizard.getButton("next")
                                            .getAttribute("accesskey");
     this._backButtonLabel = this.wizard.getButton("back").label;
     this._backButtonAccesskey = this.wizard.getButton("back")
                                            .getAttribute("accesskey");
   },
 
-  startNewAccountSetup: function() {
+  startNewAccountSetup() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
     this._settingUpNew = true;
     this.wizard.pageIndex = NEW_ACCOUNT_START_PAGE;
   },
 
-  useExistingAccount: function() {
+  useExistingAccount() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
     this._settingUpNew = false;
     if (this.wizardType == "pair") {
       // We're already pairing, so there's no point in pairing again.
       // Go straight to the manual login page.
       this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE;
     } else {
@@ -168,46 +168,46 @@ var gSyncSetup = {
 
     // changePassphrase() will sync, make sure we set the "firstSync" pref
     // according to the user's pref.
     Weave.Svc.Prefs.reset("firstSync");
     this.setupInitialSync();
     gSyncUtils.resetPassphrase(true);
   },
 
-  onResetPassphrase: function() {
+  onResetPassphrase() {
     document.getElementById("existingPassphrase").value =
       Weave.Utils.hyphenatePassphrase(Weave.Service.identity.syncKey);
     this.checkFields();
     this.wizard.advance();
   },
 
-  onLoginStart: function() {
+  onLoginStart() {
     this.toggleLoginFeedback(false);
   },
 
-  onLoginEnd: function() {
+  onLoginEnd() {
     this.toggleLoginFeedback(true);
   },
 
-  sendCredentialsAfterSync: function() {
+  sendCredentialsAfterSync() {
     let send = function() {
       Services.obs.removeObserver("weave:service:sync:finish", send);
       Services.obs.removeObserver("weave:service:sync:error", send);
       let credentials = {account:   Weave.Service.identity.account,
                          password:  Weave.Service.identity.basicPassword,
                          synckey:   Weave.Service.identity.syncKey,
                          serverURL: Weave.Service.serverURL};
       this._jpakeclient.sendAndComplete(credentials);
     }.bind(this);
     Services.obs.addObserver("weave:service:sync:finish", send, false);
     Services.obs.addObserver("weave:service:sync:error", send, false);
   },
 
-  toggleLoginFeedback: function(stop) {
+  toggleLoginFeedback(stop) {
     document.getElementById("login-throbber").hidden = stop;
     let password = document.getElementById("existingPasswordFeedbackRow");
     let server = document.getElementById("existingServerFeedbackRow");
     let passphrase = document.getElementById("existingPassphraseFeedbackRow");
 
     if (!stop || (Weave.Status.login == Weave.LOGIN_SUCCEEDED)) {
       password.hidden = server.hidden = passphrase.hidden = true;
       return;
@@ -226,38 +226,38 @@ var gSyncSetup = {
         break;
       case Weave.LOGIN_FAILED_INVALID_PASSPHRASE:
         feedback = passphrase;
         break;
     }
     this._setFeedbackMessage(feedback, false, Weave.Status.login);
   },
 
-  setupInitialSync: function() {
+  setupInitialSync() {
     let action = document.getElementById("mergeChoiceRadio").selectedItem.id;
     switch (action) {
       case "resetClient":
         // if we're not resetting sync, we don't need to explicitly
         // call resetClient
         if (!this._resettingSync)
           return;
         // otherwise, fall through
       case "wipeClient":
       case "wipeRemote":
         Weave.Svc.Prefs.set("firstSync", action);
         break;
     }
   },
 
   // fun with validation!
-  checkFields: function() {
+  checkFields() {
     this.wizard.canAdvance = this.readyToAdvance();
   },
 
-  readyToAdvance: function() {
+  readyToAdvance() {
     switch (this.wizard.pageIndex) {
       case INTRO_PAGE:
         return false;
       case NEW_ACCOUNT_START_PAGE:
         for (let i in this.status) {
           if (!this.status[i])
             return false;
         }
@@ -288,26 +288,26 @@ var gSyncSetup = {
     if (textbox && textbox.value.length == PIN_PART_LENGTH) {
       this.nextFocusEl[textbox.id].focus();
     }
     this.wizard.canAdvance = (this.pin1.value.length == PIN_PART_LENGTH &&
                               this.pin2.value.length == PIN_PART_LENGTH &&
                               this.pin3.value.length == PIN_PART_LENGTH);
   },
 
-  onEmailInput: function() {
+  onEmailInput() {
     // Check account validity when the user stops typing for 1 second.
     if (this._checkAccountTimer)
       window.clearTimeout(this._checkAccountTimer);
     this._checkAccountTimer = window.setTimeout(function() {
       gSyncSetup.checkAccount();
     }, 1000);
   },
 
-  checkAccount: function() {
+  checkAccount() {
     delete this._checkAccountTimer;
     let value = Weave.Utils.normalizeAccount(
       document.getElementById("weaveEmail").value);
     if (!value) {
       this.status.email = false;
       this.checkFields();
       return;
     }
@@ -332,29 +332,29 @@ var gSyncSetup = {
 
     this._setFeedbackMessage(feedback, valid, str);
     this.status.email = valid;
     if (valid)
       Weave.Service.identity.account = value;
     this.checkFields();
   },
 
-  onPasswordChange: function() {
+  onPasswordChange() {
     let password = document.getElementById("weavePassword");
     let pwconfirm = document.getElementById("weavePasswordConfirm");
     let [valid, errorString] = gSyncUtils.validatePassword(password, pwconfirm);
 
     let feedback = document.getElementById("passwordFeedbackRow");
     this._setFeedback(feedback, valid, errorString);
 
     this.status.password = valid;
     this.checkFields();
   },
 
-  onPageShow: function() {
+  onPageShow() {
     switch (this.wizard.pageIndex) {
       case PAIR_PAGE:
         this.wizard.getButton("back").hidden = true;
         this.wizard.getButton("extra1").hidden = true;
         this.onPINInput();
         this.pin1.focus();
         break;
       case INTRO_PAGE:
@@ -415,17 +415,17 @@ var gSyncSetup = {
         this.wizard.getButton("back").removeAttribute("accesskey");
         this.wizard.getButton("back").hidden = this._resettingSync;
         this.wizard.getButton("next").hidden = false;
         this.wizard.getButton("finish").hidden = true;
         break;
     }
   },
 
-  onWizardAdvance: function() {
+  onWizardAdvance() {
     // Check pageIndex so we don't prompt before the Sync setup wizard appears.
     // This is a fallback in case the Master Password gets locked mid-wizard.
     if ((this.wizard.pageIndex >= 0) &&
         !Weave.Utils.ensureMPUnlocked()) {
       return false;
     }
 
     switch (this.wizard.pageIndex) {
@@ -504,17 +504,17 @@ var gSyncSetup = {
           this.wizardFinish();
           return false;
         }
         return this.returnFromOptions();
     }
     return true;
   },
 
-  onWizardBack: function() {
+  onWizardBack() {
     switch (this.wizard.pageIndex) {
       case NEW_ACCOUNT_START_PAGE:
         this.wizard.pageIndex = INTRO_PAGE;
         return false;
       case EXISTING_ACCOUNT_CONNECT_PAGE:
         this.abortEasySetup();
         this.wizard.pageIndex = INTRO_PAGE;
         return false;
@@ -530,17 +530,17 @@ var gSyncSetup = {
       case OPTIONS_CONFIRM_PAGE:
         // Backing up from the confirmation page = resetting first sync to merge.
         document.getElementById("mergeChoiceRadio").selectedIndex = 0;
         return this.returnFromOptions();
     }
     return true;
   },
 
-  wizardFinish: function() {
+  wizardFinish() {
     this.setupInitialSync();
 
     if (this.wizardType == "pair") {
       this.completePairing();
     }
 
     if (!this._resettingSync) {
       function isChecked(element) {
@@ -558,31 +558,31 @@ var gSyncSetup = {
 
       Weave.Service.persistLogin();
       Weave.Svc.Obs.notify("weave:service:setup-complete");
     }
     Weave.Utils.nextTick(Weave.Service.sync, Weave.Service);
     window.close();
   },
 
-  onWizardCancel: function() {
+  onWizardCancel() {
     if (this._resettingSync)
       return;
 
     this.abortEasySetup();
     this._handleNoScript(false);
     Weave.Service.startOver();
   },
 
-  onSyncOptions: function() {
+  onSyncOptions() {
     this._beforeOptionsPage = this.wizard.pageIndex;
     this.wizard.pageIndex = OPTIONS_PAGE;
   },
 
-  returnFromOptions: function() {
+  returnFromOptions() {
     this.wizard.getButton("next").label = this._nextButtonLabel;
     this.wizard.getButton("next").setAttribute("accesskey",
                                                this._nextButtonAccesskey);
     this.wizard.getButton("back").label = this._backButtonLabel;
     this.wizard.getButton("back").setAttribute("accesskey",
                                                this._backButtonAccesskey);
     this.wizard.getButton("cancel").hidden = false;
     this.wizard.getButton("extra1").hidden = false;
@@ -639,17 +639,17 @@ var gSyncSetup = {
       // have to pair again?
       return;
     }
     let controller = new Weave.SendCredentialsController(this._jpakeclient,
                                                          Weave.Service);
     this._jpakeclient.controller = controller;
   },
 
-  startEasySetup: function() {
+  startEasySetup() {
     // Don't do anything if we have a client already (e.g. we went to
     // Sync Options and just came back).
     if (this._jpakeclient)
       return;
 
     // When onAbort is called, Weave may already be gone
     const JPAKE_ERROR_USERABORT = Weave.JPAKE_ERROR_USERABORT;
 
@@ -686,36 +686,36 @@ var gSyncSetup = {
 
         // Restart on all other errors.
         self.startEasySetup();
       }
     });
     this._jpakeclient.receiveNoPIN();
   },
 
-  abortEasySetup: function() {
+  abortEasySetup() {
     document.getElementById("easySetupPIN1").value = "";
     document.getElementById("easySetupPIN2").value = "";
     document.getElementById("easySetupPIN3").value = "";
     if (!this._jpakeclient)
       return;
 
     this._jpakeclient.abort();
     delete this._jpakeclient;
   },
 
-  manualSetup: function() {
+  manualSetup() {
     this.abortEasySetup();
     this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE;
   },
 
   // _handleNoScript is needed because it blocks the captcha. So we temporarily
   // allow the necessary sites so that we can verify the user is in fact a human.
   // This was done with the help of Giorgio (NoScript author). See bug 508112.
-  _handleNoScript: function(addExceptions) {
+  _handleNoScript(addExceptions) {
     // if NoScript isn't installed, or is disabled, bail out.
     let ns = Cc["@maone.net/noscript-service;1"];
     if (ns == null)
       return;
 
     ns = ns.getService().wrappedJSObject;
     if (addExceptions) {
       this._remoteSites.forEach(function(site) {
@@ -729,42 +729,42 @@ var gSyncSetup = {
     else {
       this._disabledSites.forEach(function(site) {
         ns.setJSEnabled(site, false);
       });
       this._disabledSites = [];
     }
   },
 
-  onExistingServerCommand: function() {
+  onExistingServerCommand() {
     let control = document.getElementById("existingServer");
     if (control.selectedIndex == 0) {
       control.removeAttribute("editable");
       Weave.Svc.Prefs.reset("serverURL");
     } else {
       control.setAttribute("editable", "true");
       // Force a style flush to ensure that the binding is attached.
       control.clientTop;
       control.value = "";
       control.inputField.focus();
     }
     document.getElementById("existingServerFeedbackRow").hidden = true;
     this.checkFields();
   },
 
-  onExistingServerInput: function() {
+  onExistingServerInput() {
     // Check custom server validity when the user stops typing for 1 second.
     if (this._existingServerTimer)
       window.clearTimeout(this._existingServerTimer);
     this._existingServerTimer = window.setTimeout(function() {
       gSyncSetup.checkFields();
     }, 1000);
   },
 
-  onServerCommand: function() {
+  onServerCommand() {
     setVisibility(document.getElementById("TOSRow"), this._usingMainServers);
     let control = document.getElementById("server");
     if (!this._usingMainServers) {
       control.setAttribute("editable", "true");
       // Force a style flush to ensure that the binding is attached.
       control.clientTop;
       control.value = "";
       control.inputField.focus();
@@ -778,26 +778,26 @@ var gSyncSetup = {
       this.loadCaptcha();
     }
     this.checkAccount();
     this.status.server = true;
     document.getElementById("serverFeedbackRow").hidden = true;
     this.checkFields();
   },
 
-  onServerInput: function() {
+  onServerInput() {
     // Check custom server validity when the user stops typing for 1 second.
     if (this._checkServerTimer)
       window.clearTimeout(this._checkServerTimer);
     this._checkServerTimer = window.setTimeout(function() {
       gSyncSetup.checkServer();
     }, 1000);
   },
 
-  checkServer: function() {
+  checkServer() {
     delete this._checkServerTimer;
     let el = document.getElementById("server");
     let valid = false;
     let feedback = document.getElementById("serverFeedbackRow");
     if (el.value) {
       valid = this._validateServer(el);
       let str = valid ? "" : "serverInvalid.label";
       this._setFeedbackMessage(feedback, valid, str);
@@ -808,17 +808,17 @@ var gSyncSetup = {
     // Recheck account against the new server.
     if (valid)
       this.checkAccount();
 
     this.status.server = valid;
     this.checkFields();
   },
 
-  _validateServer: function(element) {
+  _validateServer(element) {
     let valid = false;
     let val = element.value;
     if (!val)
       return false;
 
     let uri = Weave.Utils.makeURI(val);
 
     if (!uri)
@@ -854,17 +854,17 @@ var gSyncSetup = {
     if (valid)
       element.value = Weave.Service.serverURL;
     else
       Weave.Svc.Prefs.reset("serverURL");
 
     return valid;
   },
 
-  _handleChoice: function() {
+  _handleChoice() {
     let desc = document.getElementById("mergeChoiceRadio").selectedIndex;
     document.getElementById("chosenActionDeck").selectedIndex = desc;
     switch (desc) {
       case 1:
         if (this._case1Setup)
           break;
 
         let places_db = PlacesUtils.history
@@ -978,27 +978,27 @@ var gSyncSetup = {
         break;
     }
 
     return true;
   },
 
   // sets class and string on a feedback element
   // if no property string is passed in, we clear label/style
-  _setFeedback: function(element, success, string) {
+  _setFeedback(element, success, string) {
     element.hidden = success || !string;
     let classname = success ? "success" : "error";
     let image = element.getElementsByAttribute("class", "statusIcon")[0];
     image.setAttribute("status", classname);
     let label = element.getElementsByAttribute("class", "status")[0];
     label.value = string;
   },
 
   // shim
-  _setFeedbackMessage: function(element, success, string) {
+  _setFeedbackMessage(element, success, string) {
     let str = "";
     if (string) {
       try {
         str = this._stringBundle.GetStringFromName(string);
       } catch (e) {}
 
       if (!str)
         str = Weave.Utils.getErrorString(string);
@@ -1010,34 +1010,34 @@ var gSyncSetup = {
     let captchaURI = Weave.Service.miscAPI + "captcha_html";
     // First check for NoScript and whitelist the right sites.
     this._handleNoScript(true);
     if (this.captchaBrowser.currentURI.spec != captchaURI) {
       this.captchaBrowser.loadURI(captchaURI);
     }
   },
 
-  onStateChange: function(webProgress, request, stateFlags, status) {
+  onStateChange(webProgress, request, stateFlags, status) {
     // We're only looking for the end of the frame load
     if ((stateFlags & Ci.nsIWebProgressListener.STATE_STOP) == 0)
       return;
     if ((stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) == 0)
       return;
     if ((stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) == 0)
       return;
 
     // If we didn't find a captcha, assume it's not needed and don't show it.
     let responseStatus = request.QueryInterface(Ci.nsIHttpChannel).responseStatus;
     setVisibility(this.captchaBrowser, responseStatus != 404);
     // XXX TODO we should really log any responseStatus other than 200
   },
-  onProgressChange: function() {},
-  onStatusChange: function() {},
-  onSecurityChange: function() {},
-  onLocationChange: function() {}
+  onProgressChange() {},
+  onStatusChange() {},
+  onSecurityChange() {},
+  onLocationChange() {}
 };
 
 // Define lazy getters for various XUL elements.
 //
 // onWizardAdvance() and onPageShow() are run before init(), so we'll even
 // define things that will almost certainly be used (like 'wizard') as a lazy
 // getter here.
 ["wizard",
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -17,17 +17,17 @@ var gSyncUtils = {
   get fxAccountsEnabled() {
     let service = Components.classes["@mozilla.org/weave/service;1"]
                             .getService(Components.interfaces.nsISupports)
                             .wrappedJSObject;
     return service.fxAccountsEnabled;
   },
 
   // opens in a new window if we're in a modal prefwindow world, in a new tab otherwise
-  _openLink: function(url) {
+  _openLink(url) {
     let thisDocEl = document.documentElement,
         openerDocEl = window.opener && window.opener.document.documentElement;
     if (thisDocEl.id == "accountSetup" && window.opener &&
         openerDocEl.id == "BrowserPreferences" && !openerDocEl.instantApply)
       openUILinkIn(url, "window");
     else if (thisDocEl.id == "BrowserPreferences" && !thisDocEl.instantApply)
       openUILinkIn(url, "window");
     else if (document.documentElement.id == "change-dialog")
@@ -53,61 +53,61 @@ var gSyncUtils = {
 
     // Open up the change dialog
     let changeXUL = "chrome://browser/content/sync/genericChange.xul";
     let changeOpt = "centerscreen,chrome,resizable=no";
     Services.ww.activeWindow.openDialog(changeXUL, "", changeOpt,
                                         type, duringSetup);
   },
 
-  changePassword: function() {
+  changePassword() {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("ChangePassword");
   },
 
-  resetPassphrase: function(duringSetup) {
+  resetPassphrase(duringSetup) {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("ResetPassphrase", duringSetup);
   },
 
-  updatePassphrase: function() {
+  updatePassphrase() {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("UpdatePassphrase");
   },
 
-  resetPassword: function() {
+  resetPassword() {
     this._openLink(Weave.Service.pwResetURL);
   },
 
   get tosURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
     return  Weave.Svc.Prefs.get(root + "termsURL");
   },
 
-  openToS: function() {
+  openToS() {
     this._openLink(this.tosURL);
   },
 
   get privacyPolicyURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
     return  Weave.Svc.Prefs.get(root + "privacyURL");
   },
 
-  openPrivacyPolicy: function() {
+  openPrivacyPolicy() {
     this._openLink(this.privacyPolicyURL);
   },
 
   /**
    * Prepare an invisible iframe with the passphrase backup document.
    * Used by both the print and saving methods.
    *
    * @param elid : ID of the form element containing the passphrase.
    * @param callback : Function called once the iframe has loaded.
    */
-  _preparePPiframe: function(elid, callback) {
+  _preparePPiframe(elid, callback) {
     let pp = document.getElementById(elid).value;
 
     // Create an invisible iframe whose contents we can print.
     let iframe = document.createElement("iframe");
     iframe.setAttribute("src", "chrome://browser/content/sync/key.xhtml");
     iframe.collapsed = true;
     document.documentElement.appendChild(iframe);
     iframe.contentWindow.addEventListener("load", function() {
@@ -132,17 +132,17 @@ var gSyncUtils = {
     }, false);
   },
 
   /**
    * Print passphrase backup document.
    *
    * @param elid : ID of the form element containing the passphrase.
    */
-  passphrasePrint: function(elid) {
+  passphrasePrint(elid) {
     this._preparePPiframe(elid, function(iframe) {
       let webBrowserPrint = iframe.contentWindow
                                   .QueryInterface(Ci.nsIInterfaceRequestor)
                                   .getInterface(Ci.nsIWebBrowserPrint);
       let printSettings = PrintUtils.getPrintSettings();
 
       // Display no header/footer decoration except for the date.
       printSettings.headerStrLeft
@@ -160,17 +160,17 @@ var gSyncUtils = {
     });
   },
 
   /**
    * Save passphrase backup document to disk as HTML file.
    *
    * @param elid : ID of the form element containing the passphrase.
    */
-  passphraseSave: function(elid) {
+  passphraseSave(elid) {
     let dialogTitle = this.bundle.GetStringFromName("save.recoverykey.title");
     let defaultSaveName = this.bundle.GetStringFromName("save.recoverykey.defaultfilename");
     this._preparePPiframe(elid, function(iframe) {
       let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
       let fpCallback = function fpCallback_done(aResult) {
         if (aResult == Ci.nsIFilePicker.returnOK ||
             aResult == Ci.nsIFilePicker.returnReplace) {
           let stream = Cc["@mozilla.org/network/file-output-stream;1"].
@@ -198,17 +198,17 @@ var gSyncUtils = {
   /**
    * validatePassword
    *
    * @param el1 : the first textbox element in the form
    * @param el2 : the second textbox element, if omitted it's an update form
    *
    * returns [valid, errorString]
    */
-  validatePassword: function(el1, el2) {
+  validatePassword(el1, el2) {
     let valid = false;
     let val1 = el1.value;
     let val2 = el2 ? el2.value : "";
     let error = "";
 
     if (!el2)
       valid = val1.length >= Weave.MIN_PASS_LENGTH;
     else if (val1 && val1 == Weave.Service.identity.username)
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -22,17 +22,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode",
   "resource://gre/modules/ReaderMode.jsm");
 XPCOMUtils.defineLazyGetter(this, "SimpleServiceDiscovery", function() {
   let ssdp = Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm", {}).SimpleServiceDiscovery;
   // Register targets
   ssdp.registerDevice({
     id: "roku:ecp",
     target: "roku:ecp",
-    factory: function(aService) {
+    factory(aService) {
       Cu.import("resource://gre/modules/RokuApp.jsm");
       return new RokuApp(aService);
     },
     types: ["video/mp4"],
     extensions: ["mp4"]
   });
   return ssdp;
 });
@@ -93,82 +93,82 @@ addMessageListener("MixedContent:Reenabl
 addMessageListener("SecondScreen:tab-mirror", function(message) {
   if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
     return;
   }
   let app = SimpleServiceDiscovery.findAppForService(message.data.service);
   if (app) {
     let width = content.innerWidth;
     let height = content.innerHeight;
-    let viewport = {cssWidth: width, cssHeight: height, width: width, height: height};
+    let viewport = {cssWidth: width, cssHeight: height, width, height};
     app.mirror(function() {}, content, viewport, function() {}, content);
   }
 });
 
 var AboutHomeListener = {
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     chromeGlobal.addEventListener('AboutHomeLoad', this, false, true);
   },
 
   get isAboutHome() {
     return content.document.documentURI.toLowerCase() == "about:home";
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (!this.isAboutHome) {
       return;
     }
     switch (aEvent.type) {
       case "AboutHomeLoad":
         this.onPageLoad();
         break;
       case "click":
         this.onClick(aEvent);
         break;
       case "pagehide":
         this.onPageHide(aEvent);
         break;
     }
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     if (!this.isAboutHome) {
       return;
     }
     switch (aMessage.name) {
       case "AboutHome:Update":
         this.onUpdate(aMessage.data);
         break;
     }
   },
 
-  onUpdate: function(aData) {
+  onUpdate(aData) {
     let doc = content.document;
     if (aData.showRestoreLastSession && !PrivateBrowsingUtils.isContentWindowPrivate(content))
       doc.getElementById("launcher").setAttribute("session", "true");
 
     // Inject search engine and snippets URL.
     let docElt = doc.documentElement;
     // Set snippetsVersion last, which triggers to show the snippets when it's set.
     docElt.setAttribute("snippetsURL", aData.snippetsURL);
     if (aData.showKnowYourRights)
       docElt.setAttribute("showKnowYourRights", "true");
     docElt.setAttribute("snippetsVersion", aData.snippetsVersion);
   },
 
-  onPageLoad: function() {
+  onPageLoad() {
     addMessageListener("AboutHome:Update", this);
     addEventListener("click", this, true);
     addEventListener("pagehide", this, true);
 
     sendAsyncMessage("AboutHome:MaybeShowAutoMigrationUndoNotification");
     sendAsyncMessage("AboutHome:RequestUpdate");
   },
 
-  onClick: function(aEvent) {
+  onClick(aEvent) {
     if (!aEvent.isTrusted || // Don't trust synthetic events
         aEvent.button == 2 || aEvent.target.localName != "button") {
       return;
     }
 
     let originalTarget = aEvent.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (ownerDoc.documentURI != "about:home") {
@@ -205,17 +205,17 @@ var AboutHomeListener = {
         break;
 
       case "settings":
         sendAsyncMessage("AboutHome:Settings");
         break;
     }
   },
 
-  onPageHide: function(aEvent) {
+  onPageHide(aEvent) {
     if (aEvent.target.defaultView.frameElement) {
       return;
     }
     removeMessageListener("AboutHome:Update", this);
     removeEventListener("click", this, true);
     removeEventListener("pagehide", this, true);
   },
 };
@@ -255,26 +255,26 @@ var AboutPrivateBrowsingListener = {
 AboutPrivateBrowsingListener.init(this);
 
 var AboutReaderListener = {
 
   _articlePromise: null,
 
   _isLeavingReaderMode: false,
 
-  init: function() {
+  init() {
     addEventListener("AboutReaderContentLoaded", this, false, true);
     addEventListener("DOMContentLoaded", this, false);
     addEventListener("pageshow", this, false);
     addEventListener("pagehide", this, false);
     addMessageListener("Reader:ToggleReaderMode", this);
     addMessageListener("Reader:PushState", this);
   },
 
-  receiveMessage: function(message) {
+  receiveMessage(message) {
     switch (message.name) {
       case "Reader:ToggleReaderMode":
         if (!this.isAboutReader) {
           this._articlePromise = ReaderMode.parseDocument(content.document).catch(Cu.reportError);
           ReaderMode.enterReaderMode(docShell, content);
         } else {
           this._isLeavingReaderMode = true;
           ReaderMode.leaveReaderMode(docShell, content);
@@ -289,17 +289,17 @@ var AboutReaderListener = {
 
   get isAboutReader() {
     if (!content) {
       return false;
     }
     return content.document.documentURI.startsWith("about:reader");
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     if (aEvent.originalTarget.defaultView != content) {
       return;
     }
 
     switch (aEvent.type) {
       case "AboutReaderContentLoaded":
         if (!this.isAboutReader) {
           return;
@@ -339,44 +339,44 @@ var AboutReaderListener = {
   },
 
   /**
    * NB: this function will update the state of the reader button asynchronously
    * after the next mozAfterPaint call (assuming reader mode is enabled and
    * this is a suitable document). Calling it on things which won't be
    * painted is not going to work.
    */
-  updateReaderButton: function(forceNonArticle) {
+  updateReaderButton(forceNonArticle) {
     if (!ReaderMode.isEnabledForParseOnLoad || this.isAboutReader ||
         !content || !(content.document instanceof content.HTMLDocument) ||
         content.document.mozSyntheticDocument) {
       return;
     }
 
     this.scheduleReadabilityCheckPostPaint(forceNonArticle);
   },
 
-  cancelPotentialPendingReadabilityCheck: function() {
+  cancelPotentialPendingReadabilityCheck() {
     if (this._pendingReadabilityCheck) {
       removeEventListener("MozAfterPaint", this._pendingReadabilityCheck);
       delete this._pendingReadabilityCheck;
     }
   },
 
-  scheduleReadabilityCheckPostPaint: function(forceNonArticle) {
+  scheduleReadabilityCheckPostPaint(forceNonArticle) {
     if (this._pendingReadabilityCheck) {
       // We need to stop this check before we re-add one because we don't know
       // if forceNonArticle was true or false last time.
       this.cancelPotentialPendingReadabilityCheck();
     }
     this._pendingReadabilityCheck = this.onPaintWhenWaitedFor.bind(this, forceNonArticle);
     addEventListener("MozAfterPaint", this._pendingReadabilityCheck);
   },
 
-  onPaintWhenWaitedFor: function(forceNonArticle, event) {
+  onPaintWhenWaitedFor(forceNonArticle, event) {
     // In non-e10s, we'll get called for paints other than ours, and so it's
     // possible that this page hasn't been laid out yet, in which case we
     // should wait until we get an event that does relate to our layout. We
     // determine whether any of our content got painted by checking if there
     // are any painted rects.
     if (!event.clientRects.length) {
       return;
     }
@@ -396,135 +396,135 @@ AboutReaderListener.init();
 
 var ContentSearchMediator = {
 
   whitelist: new Set([
     "about:home",
     "about:newtab",
   ]),
 
-  init: function(chromeGlobal) {
+  init(chromeGlobal) {
     chromeGlobal.addEventListener("ContentSearchClient", this, true, true);
     addMessageListener("ContentSearch", this);
   },
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (this._contentWhitelisted) {
       this._sendMsg(event.detail.type, event.detail.data);
     }
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     if (msg.data.type == "AddToWhitelist") {
       for (let uri of msg.data.data) {
         this.whitelist.add(uri);
       }
       this._sendMsg("AddToWhitelistAck");
       return;
     }
     if (this._contentWhitelisted) {
       this._fireEvent(msg.data.type, msg.data.data);
     }
   },
 
   get _contentWhitelisted() {
     return this.whitelist.has(content.document.documentURI);
   },
 
-  _sendMsg: function(type, data = null) {
+  _sendMsg(type, data = null) {
     sendAsyncMessage("ContentSearch", {
-      type: type,
-      data: data,
+      type,
+      data,
     });
   },
 
-  _fireEvent: function(type, data = null) {
+  _fireEvent(type, data = null) {
     let event = Cu.cloneInto({
       detail: {
-        type: type,
-        data: data,
+        type,
+        data,
       },
     }, content);
     content.dispatchEvent(new content.CustomEvent("ContentSearchService",
                                                   event));
   },
 };
 ContentSearchMediator.init(this);
 
 var PageStyleHandler = {
-  init: function() {
+  init() {
     addMessageListener("PageStyle:Switch", this);
     addMessageListener("PageStyle:Disable", this);
     addEventListener("pageshow", () => this.sendStyleSheetInfo());
   },
 
   get markupDocumentViewer() {
     return docShell.contentViewer;
   },
 
-  sendStyleSheetInfo: function() {
+  sendStyleSheetInfo() {
     let filteredStyleSheets = this._filterStyleSheets(this.getAllStyleSheets());
 
     sendAsyncMessage("PageStyle:StyleSheets", {
-      filteredStyleSheets: filteredStyleSheets,
+      filteredStyleSheets,
       authorStyleDisabled: this.markupDocumentViewer.authorStyleDisabled,
       preferredStyleSheetSet: content.document.preferredStyleSheetSet
     });
   },
 
-  getAllStyleSheets: function(frameset = content) {
+  getAllStyleSheets(frameset = content) {
     let selfSheets = Array.slice(frameset.document.styleSheets);
     let subSheets = Array.map(frameset.frames, frame => this.getAllStyleSheets(frame));
     return selfSheets.concat(...subSheets);
   },
 
-  receiveMessage: function(msg) {
+  receiveMessage(msg) {
     switch (msg.name) {
       case "PageStyle:Switch":
         this.markupDocumentViewer.authorStyleDisabled = false;
         this._stylesheetSwitchAll(content, msg.data.title);
         break;
 
       case "PageStyle:Disable":
         this.markupDocumentViewer.authorStyleDisabled = true;
         break;
     }
 
     this.sendStyleSheetInfo();
   },
 
-  _stylesheetSwitchAll: function(frameset, title) {
+  _stylesheetSwitchAll(frameset, title) {
     if (!title || this._stylesheetInFrame(frameset, title)) {
       this._stylesheetSwitchFrame(frameset, title);
     }
 
     for (let i = 0; i < frameset.frames.length; i++) {
       // Recurse into sub-frames.
       this._stylesheetSwitchAll(frameset.frames[i], title);
     }
   },
 
-  _stylesheetSwitchFrame: function(frame, title) {
+  _stylesheetSwitchFrame(frame, title) {
     var docStyleSheets = frame.document.styleSheets;
 
     for (let i = 0; i < docStyleSheets.length; ++i) {
       let docStyleSheet = docStyleSheets[i];
       if (docStyleSheet.title) {
         docStyleSheet.disabled = (docStyleSheet.title != title);
       } else if (docStyleSheet.disabled) {
         docStyleSheet.disabled = false;
       }
     }
   },
 
-  _stylesheetInFrame: function(frame, title) {
+  _stylesheetInFrame(frame, title) {
     return Array.some(frame.document.styleSheets, (styleSheet) => styleSheet.title == title);
   },
 
-  _filterStyleSheets: function(styleSheets) {
+  _filterStyleSheets(styleSheets) {
     let result = [];
 
     for (let currentStyleSheet of styleSheets) {
       if (!currentStyleSheet.title)
         continue;
 
       // Skip any stylesheets that don't match the screen media type.
       if (currentStyleSheet.media.length > 0) {
@@ -656,23 +656,23 @@ let PrerenderContentHandler = {
     if (this._pending.length >= 2) {
       return;
     }
 
     let id = ++this._idMonotonic;
     sendAsyncMessage("Prerender:Request", {
       href: aHref.spec,
       referrer: aReferrer ? aReferrer.spec : null,
-      id: id,
+      id,
     });
 
     this._pending.push({
       href: aHref,
       referrer: aReferrer,
-      id: id,
+      id,
       success: null,
       failure: null,
     });
   },
 
   shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) {
     // Check if we think there is a prerendering document pending for the given
     // href and referrer. If we think there is one, we will send a message to
@@ -694,47 +694,47 @@ let PrerenderContentHandler = {
 
 if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
   // We only want to initialize the PrerenderContentHandler in the content
   // process. Outside of the content process, this should be unused.
   PrerenderContentHandler.init();
 }
 
 var WebBrowserChrome = {
-  onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
+  onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) {
     return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab);
   },
 
   // Check whether this URI should load in the current process
-  shouldLoadURI: function(aDocShell, aURI, aReferrer) {
+  shouldLoadURI(aDocShell, aURI, aReferrer) {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
       return false;
     }
 
     return true;
   },
 
-  shouldLoadURIInThisProcess: function(aURI) {
+  shouldLoadURIInThisProcess(aURI) {
     return E10SUtils.shouldLoadURIInThisProcess(aURI);
   },
 
   // Try to reload the currently active or currently loading page in a new process.
-  reloadInFreshProcess: function(aDocShell, aURI, aReferrer) {
+  reloadInFreshProcess(aDocShell, aURI, aReferrer) {
     E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, true);
     return true;
   },
 
-  startPrerenderingDocument: function(aHref, aReferrer) {
+  startPrerenderingDocument(aHref, aReferrer) {
     if (PrerenderContentHandler.initialized) {
       PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer);
     }
   },
 
-  shouldSwitchToPrerenderedDocument: function(aHref, aReferrer, aSuccess, aFailure) {
+  shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) {
     if (PrerenderContentHandler.initialized) {
       return PrerenderContentHandler.shouldSwitchToPrerenderedDocument(
         aHref, aReferrer, aSuccess, aFailure);
     }
     return false;
   }
 };
 
@@ -742,17 +742,17 @@ if (Services.appinfo.processType == Serv
   let tabchild = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsITabChild);
   tabchild.webBrowserChrome = WebBrowserChrome;
 }
 
 
 var DOMFullscreenHandler = {
 
-  init: function() {
+  init() {
     addMessageListener("DOMFullscreen:Entered", this);
     addMessageListener("DOMFullscreen:CleanUp", this);
     addEventListener("MozDOMFullscreen:Request", this);
     addEventListener("MozDOMFullscreen:Entered", this);
     addEventListener("MozDOMFullscreen:NewOrigin", this);
     addEventListener("MozDOMFullscreen:Exit", this);
     addEventListener("MozDOMFullscreen:Exited", this);
   },
@@ -760,17 +760,17 @@ var DOMFullscreenHandler = {
   get _windowUtils() {
     if (!content) {
       return null;
     }
     return content.QueryInterface(Ci.nsIInterfaceRequestor)
                   .getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  receiveMessage: function(aMessage) {
+  receiveMessage(aMessage) {
     let windowUtils = this._windowUtils;
     switch (aMessage.name) {
       case "DOMFullscreen:Entered": {
         this._lastTransactionId = windowUtils.lastTransactionId;
         if (!windowUtils.handleFullscreenRequests() &&
             !content.document.fullscreenElement) {
           // If we don't actually have any pending fullscreen request
           // to handle, neither we have been in fullscreen, tell the
@@ -788,17 +788,17 @@ var DOMFullscreenHandler = {
           this._lastTransactionId = windowUtils.lastTransactionId;
           windowUtils.exitFullscreen();
         }
         break;
       }
     }
   },
 
-  handleEvent: function(aEvent) {
+  handleEvent(aEvent) {
     switch (aEvent.type) {
       case "MozDOMFullscreen:Request": {
         sendAsyncMessage("DOMFullscreen:Request");
         break;
       }
       case "MozDOMFullscreen:NewOrigin": {
         sendAsyncMessage("DOMFullscreen:NewOrigin", {
           originNoSuffix: aEvent.target.nodePrincipal.originNoSuffix,
--- 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/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -31,21 +31,21 @@ registerCleanupFunction(function() {
   for (let name of changedPrefs) {
     Services.prefs.clearUserPref(name);
   }
 });
 
 var gTests = [
 {
   desc: "Test the remote commands",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *run()
   {
     setPref("identity.fxaccounts.remote.signup.uri",
             "https://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html");
     let tab = yield promiseNewTabLoadEvent("about:accounts");
     let mm = tab.linkedBrowser.messageManager;
 
     let deferred = Promise.defer();
 
@@ -71,17 +71,17 @@ var gTests = [
     }
     yield deferred.promise;
     yield promisePrefsOpened;
   }
 },
 {
   desc: "Test action=signin - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *run()
   {
     // When this loads with no user logged-in, we expect the "normal" URL
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     is(url, expected_url, "action=signin got the expected URL");
     // we expect the remote iframe to be shown.
     yield checkVisibilities(tab, {
@@ -90,21 +90,21 @@ var gTests = [
       intro: false, // this is  "get started"
       remote: true,
       networkError: false
     });
   }
 },
 {
   desc: "Test action=signin - user logged in",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *run()
   {
     // When this loads with a user logged-in, we expect the normal URL to
     // have been ignored and the "manage" page to be shown.
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts?action=signin");
     // about:accounts initializes after fetching the current user from Fxa -
@@ -119,17 +119,17 @@ var gTests = [
       remote: false,
       networkError: false
     });
   }
 },
 {
   desc: "Test action=signin - captive portal",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *run()
   {
     const signinUrl = "https://redirproxy.example.com/test";
     setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
     let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
       manage: false,
       intro: false, // this is  "get started"
@@ -139,17 +139,17 @@ var gTests = [
   }
 },
 {
   desc: "Test action=signin - offline",
   teardown: () => {
     gBrowser.removeCurrentTab();
     BrowserOffline.toggleOfflineStatus();
   },
-  run: function* ()
+  *run()
   {
     BrowserOffline.toggleOfflineStatus();
     Services.cache2.clear();
 
     const signinUrl = "https://unknowndomain.cow";
     setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
     let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     yield checkVisibilities(tab, {
@@ -159,17 +159,17 @@ var gTests = [
       remote: false,
       networkError: true
     });
   }
 },
 {
   desc: "Test action=signup - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *run()
   {
     const expected_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", expected_url);
     let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signup");
     is(url, expected_url, "action=signup got the expected URL");
     // we expect the remote iframe to be shown.
     yield checkVisibilities(tab, {
       stage: false, // parent of 'manage' and 'intro'
@@ -178,17 +178,17 @@ var gTests = [
       remote: true,
       networkError: false
     });
   },
 },
 {
   desc: "Test action=signup - user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* ()
+  *run()
   {
     const expected_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", expected_url);
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts?action=signup");
     yield fxAccounts.getSignedInUser();
     // we expect "manage" to be shown.
     yield checkVisibilities(tab, {
@@ -197,39 +197,39 @@ var gTests = [
       intro: false, // this is  "get started"
       remote: false,
       networkError: false
     });
   },
 },
 {
   desc: "Test action=reauth",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *run()
   {
     const expected_url = "https://example.com/?is_force_auth";
     setPref("identity.fxaccounts.remote.force_auth.uri", expected_url);
 
     yield setSignedInUser();
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=reauth");
     // The current user will be appended to the url
     let expected = expected_url + "&email=foo%40example.com";
     is(url, expected, "action=reauth got the expected URL");
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (success)",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *run()
   {
     let fxAccountsCommon = {};
     Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon);
     const pref = "identity.fxaccounts.migrateToDevEdition";
     changedPrefs.add(pref);
     Services.prefs.setBoolPref(pref, true);
 
     // Create the signedInUser.json file that will be used as the source of
@@ -276,21 +276,21 @@ var gTests = [
     is(Services.prefs.getBoolPref(pref), false, pref + " got the expected value");
 
     yield OS.File.remove(fxAccountsStorage);
     yield OS.File.removeEmptyDir(mockDir.path);
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (no user to migrate)",
-  teardown: function* () {
+  *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  run: function* ()
+  *run()
   {
     const pref = "identity.fxaccounts.migrateToDevEdition";
     changedPrefs.add(pref);
     Services.prefs.setBoolPref(pref, true);
 
     let profD = Services.dirsvc.get("ProfD", Ci.nsIFile);
     let mockDir = profD.clone();
     mockDir.append("about-accounts-mock-profd");
@@ -316,86 +316,86 @@ var gTests = [
     is(userData, null);
     // The migration pref should have still been switched off.
     is(Services.prefs.getBoolPref(pref), false, pref + " got the expected value");
     yield OS.File.removeEmptyDir(mockDir.path);
   },
 },
 {
   desc: "Test observers about:accounts",
-  teardown: function() {
+  teardown() {
     gBrowser.removeCurrentTab();
   },
-  run: function* () {
+  *run() {
     setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/");
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts");
     // sign the user out - the tab should have action=signin
     let loadPromise = promiseOneMessage(tab, "test:document:load");
     yield signOut();
     // wait for the new load.
     yield loadPromise;
     is(tab.linkedBrowser.contentDocument.location.href, "about:accounts?action=signin");
   }
 },
 {
   desc: "Test entrypoint query string, no action, no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* () {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/");
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome");
     is(url, "https://example.com/?entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
   },
 },
 {
   desc: "Test entrypoint query string for signin",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* () {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin&entrypoint=abouthome");
     is(url, expected_url + "&entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
   },
 },
 {
   desc: "Test entrypoint query string for signup",
   teardown: () => gBrowser.removeCurrentTab(),
-  run: function* () {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     const sign_up_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", sign_up_url);
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome&action=signup");
     is(url, sign_up_url + "&entrypoint=abouthome", "entrypoint=abouthome got the expected URL");
   },
 },
 {
   desc: "about:accounts URL params should be copied to remote URL params " +
         "when remote URL has no URL params, except for 'action'",
   teardown() {
     gBrowser.removeCurrentTab();
   },
-  run: function* () {
+  *run() {
     let signupURL = "https://example.com/";
     setPref("identity.fxaccounts.remote.signup.uri", signupURL);
     let queryStr = "email=foo%40example.com&foo=bar&baz=quux";
     let [, url] =
       yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
                                              "&action=action");
     is(url, signupURL + "?" + queryStr, "URL params are copied to signup URL");
   },
 },
 {
   desc: "about:accounts URL params should be copied to remote URL params " +
         "when remote URL already has some URL params, except for 'action'",
   teardown() {
     gBrowser.removeCurrentTab();
   },
-  run: function* () {
+  *run() {
     let signupURL = "https://example.com/?param";
     setPref("identity.fxaccounts.remote.signup.uri", signupURL);
     let queryStr = "email=foo%40example.com&foo=bar&baz=quux";
     let [, url] =
       yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
                                              "&action=action");
     is(url, signupURL + "&" + queryStr, "URL params are copied to signup URL");
   },
@@ -467,17 +467,17 @@ function checkVisibilities(tab, data) {
   let deferred = Promise.defer();
   mm.addMessageListener("test:check-visibilities-response", function onResponse(message) {
     mm.removeMessageListener("test:check-visibilities-response", onResponse);
     for (let id of ids) {
       is(message.data[id], data[id], "Element '" + id + "' has correct visibility");
     }
     deferred.resolve();
   });
-  mm.sendAsyncMessage("test:check-visibilities", {ids: ids});
+  mm.sendAsyncMessage("test:check-visibilities", {ids});
   return deferred.promise;
 }
 
 // watch out - these will fire observers which if you aren't careful, may
 // interfere with the tests.
 function setSignedInUser(data) {
   if (!data) {
     data = {
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -63,17 +63,17 @@ var gTests = [
   desc: "Test the remote commands",
   setup: Task.async(function*()
   {
     Preferences.set(TELEMETRY_LOG_PREF, "Trace");
     yield setupPingArchive();
     Preferences.set("datareporting.healthreport.about.reportUrl",
                     HTTPS_BASE + "healthreport_testRemoteCommands.html");
   }),
-  run: function(iframe)
+  run(iframe)
   {
     let deferred = Promise.defer();
     let results = 0;
     try {
       iframe.contentWindow.addEventListener("FirefoxHealthReportTestResponse", function evtHandler(event) {
         let data = event.detail.data;
         if (data.type == "testResult") {
           ok(data.pass, data.info);
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -490,17 +490,17 @@ add_task(function* () {
 
 add_task(function* () {
   info("Sync button should open about:preferences#sync");
 
   yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:home" }, function* (browser) {
     let oldOpenPrefs = window.openPreferences;
     let openPrefsPromise = new Promise(resolve => {
       window.openPreferences = function(pane, params) {
-        resolve({ pane: pane, params: params });
+        resolve({ pane, params });
       };
     });
 
     yield BrowserTestUtils.synthesizeMouseAtCenter("#sync", {}, browser);
 
     let result = yield openPrefsPromise;
     window.openPreferences = oldOpenPrefs;
 
@@ -642,24 +642,24 @@ function promiseContentSearchChange(brow
   });
 }
 
 function promiseNewEngine(basename) {
   info("Waiting for engine to be added: " + basename);
   return new Promise((resolve, reject) => {
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function(engine) {
+      onSuccess(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => {
           try {
             Services.search.removeEngine(engine);
           } catch (ex) { /* Can't remove the engine more than once */ }
         });
         resolve(engine);
       },
-      onError: function(errCode) {
+      onError(errCode) {
         ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
--- a/browser/base/content/test/general/browser_alltabslistener.js
+++ b/browser/base/content/test/general/browser_alltabslistener.js
@@ -1,79 +1,79 @@
 var Ci = Components.interfaces;
 
 const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
                        Ci.nsIWebProgressListener.STATE_IS_NETWORK;
 
 var gFrontProgressListener = {
-  onProgressChange: function(aWebProgress, aRequest,
+  onProgressChange(aWebProgress, aRequest,
                              aCurSelfProgress, aMaxSelfProgress,
                              aCurTotalProgress, aMaxTotalProgress) {
   },
 
-  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
     var state = "onStateChange";
     info("FrontProgress: " + state + " 0x" + aStateFlags.toString(16));
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   },
 
-  onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) {
+  onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
     var state = "onLocationChange";
     info("FrontProgress: " + state + " " + aLocationURI.spec);
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   },
 
-  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
   },
 
-  onSecurityChange: function(aWebProgress, aRequest, aState) {
+  onSecurityChange(aWebProgress, aRequest, aState) {
     var state = "onSecurityChange";
     info("FrontProgress: " + state + " 0x" + aState.toString(16));
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   }
 }
 
 var gAllProgressListener = {
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     var state = "onStateChange";
     info("AllProgress: " + state + " 0x" + aStateFlags.toString(16));
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
 
     if ((aStateFlags & gCompleteState) == gCompleteState) {
       ok(gAllNotificationsPos == gAllNotifications.length, "Saw the expected number of notifications");
       ok(gFrontNotificationsPos == gFrontNotifications.length, "Saw the expected number of frontnotifications");
       executeSoon(gNextTest);
     }
   },
 
-  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+  onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI,
                              aFlags) {
     var state = "onLocationChange";
     info("AllProgress: " + state + " " + aLocationURI.spec);
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   },
 
-  onStatusChange: function(aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange(aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
     var state = "onStatusChange";
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
   },
 
-  onSecurityChange: function(aBrowser, aWebProgress, aRequest, aState) {
+  onSecurityChange(aBrowser, aWebProgress, aRequest, aState) {
     var state = "onSecurityChange";
     info("AllProgress: " + state + " 0x" + aState.toString(16));
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   }
 }
--- a/browser/base/content/test/general/browser_blockHPKP.js
+++ b/browser/base/content/test/general/browser_blockHPKP.js
@@ -55,17 +55,17 @@ function loadPinningPage() {
                                                successfulPinningPageListener,
                                                true);
   });
 }
 
 // After the site is pinned try to load with a subdomain site that should
 // fail to validate
 var successfulPinningPageListener = {
-  handleEvent: function() {
+  handleEvent() {
     gBrowser.selectedBrowser.removeEventListener("load", this, true);
     BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "https://" + kBadPinningDomain).then(function() {
       return promiseErrorPageLoaded(gBrowser.selectedBrowser);
     }).then(errorPageLoaded);
   }
 };
 
 // The browser should load about:neterror, when this happens, proceed
--- a/browser/base/content/test/general/browser_bug321000.js
+++ b/browser/base/content/test/general/browser_bug321000.js
@@ -44,17 +44,17 @@ function next_test() {
 }
 
 function test_paste(aCurrentTest) {
   var element = aCurrentTest.element;
 
   // Register input listener.
   var inputListener = {
     test: aCurrentTest,
-    handleEvent: function(event) {
+    handleEvent(event) {
       element.removeEventListener(event.type, this, false);
 
       is(element.value, this.test.expected, this.test.desc);
 
       // Clear the field and go to next test.
       element.value = "";
       setTimeout(next_test, 0);
     }
--- a/browser/base/content/test/general/browser_bug356571.js
+++ b/browser/base/content/test/general/browser_bug356571.js
@@ -10,26 +10,26 @@ var didFail = false;
 const kPromptServiceUUID = "{6cc9c9fe-bc0b-432b-a410-253ef8bcc699}";
 const kPromptServiceContractID = "@mozilla.org/embedcomp/prompt-service;1";
 
 // Save original prompt service factory
 const kPromptServiceFactory = Cm.getClassObject(Cc[kPromptServiceContractID],
                                                 Ci.nsIFactory);
 
 var fakePromptServiceFactory = {
-  createInstance: function(aOuter, aIid) {
+  createInstance(aOuter, aIid) {
     if (aOuter != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return promptService.QueryInterface(aIid);
   }
 };
 
 var promptService = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]),
-  alert: function() {
+  alert() {
     didFail = true;
   }
 };
 
 /* FIXME
 Cm.QueryInterface(Ci.nsIComponentRegistrar)
   .registerFactory(Components.ID(kPromptServiceUUID), "Prompt Service",
                    kPromptServiceContractID, fakePromptServiceFactory);
@@ -42,17 +42,17 @@ const kDummyPage = "http://example.org/b
 const kURIs = [
   "bad://www.mozilla.org/",
   kDummyPage,
   kDummyPage,
 ];
 
 var gProgressListener = {
   _runCount: 0,
-  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     if ((aStateFlags & kCompleteState) == kCompleteState) {
       if (++this._runCount != kURIs.length)
         return;
       // Check we failed on unknown protocol (received an alert from docShell)
       ok(didFail, "Correctly failed on unknown protocol");
       // Check we opened all tabs
       ok(gBrowser.tabs.length == kURIs.length, "Correctly opened all expected tabs");
       finishTest();
--- a/browser/base/content/test/general/browser_bug424101.js
+++ b/browser/base/content/test/general/browser_bug424101.js
@@ -19,17 +19,17 @@ add_task(function *() {
     { element: "option" },
     { element: "optgroup" }
   ];
 
   for (let index = 0; index < tests.length; index++) {
     let test = tests[index];
 
     yield ContentTask.spawn(gBrowser.selectedBrowser,
-                            { element: test.element, type: test.type, index: index },
+                            { element: test.element, type: test.type, index },
                             function* (arg) {
       let element = content.document.createElement(arg.element);
       element.id = "element" + arg.index;
       if (arg.type) {
         element.setAttribute("type", arg.type);
       }
       content.document.body.appendChild(element);
     });
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -147,23 +147,23 @@ function waitForInstallDialog() {
       let panel = yield waitForNotification("addon-install-confirmation");
       return panel.childNodes[0];
     }
 
     info("Waiting for install dialog");
 
     let window = yield new Promise(resolve => {
       Services.wm.addListener({
-        onOpenWindow: function(aXULWindow) {
+        onOpenWindow(aXULWindow) {
           Services.wm.removeListener(this);
           resolve(aXULWindow);
         },
-        onCloseWindow: function(aXULWindow) {
+        onCloseWindow(aXULWindow) {
         },
-        onWindowTitleChange: function(aXULWindow, aNewTitle) {
+        onWindowTitleChange(aXULWindow, aNewTitle) {
         }
       });
     });
     info("Install dialog opened, waiting for focus");
 
     let domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIDOMWindow);
     yield new Promise(resolve => {
@@ -1050,17 +1050,17 @@ function test_cancel() {
     is(PopupNotifications.panel.childNodes.length, 1, "Should be only one notification");
     notification = panel.childNodes[0];
     is(notification.id, "addon-progress-notification", "Should have seen the progress notification");
 
     // Cancel the download
     let install = notification.notification.options.installs[0];
     let cancelledPromise = new Promise(resolve => {
       install.addListener({
-        onDownloadCancelled: function() {
+        onDownloadCancelled() {
           install.removeListener(this);
           resolve();
         }
       });
     });
     EventUtils.synthesizeMouseAtCenter(notification.secondaryButton, {});
     yield cancelledPromise;
 
@@ -1119,17 +1119,17 @@ function test_failedSecurity() {
     yield removeTab();
   });
 }
 ];
 
 var gTestStart = null;
 
 var XPInstallObserver = {
-  observe: function(aSubject, aTopic, aData) {
+  observe(aSubject, aTopic, aData) {
     var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     info("Observed " + aTopic + " for " + installInfo.installs.length + " installs");
     installInfo.installs.forEach(function(aInstall) {
       info("Install of " + aInstall.sourceURI.spec + " was in state " + aInstall.state);
     });
   }
 };
 
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -12,17 +12,17 @@ function checkPopupHide()
 {
   ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
      "[Test " + testId + "] The invalid form popup should not be shown");
 }
 
 var gObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
 
-  notifyInvalidSubmit : function(aFormElement, aInvalidElements)
+  notifyInvalidSubmit(aFormElement, aInvalidElements)
   {
   }
 };
 
 var testId = 0;
 
 function incrementTest()
 {
--- a/browser/base/content/test/general/browser_bug592338.js
+++ b/browser/base/content/test/general/browser_bug592338.js
@@ -139,17 +139,17 @@ function runNextTest() {
 
 function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref("extensions.logging.enabled", true);
 
   AddonManager.getInstallForURL(TESTROOT + "theme.xpi", function(aInstall) {
     aInstall.addListener({
-      onInstallEnded: function() {
+      onInstallEnded() {
         AddonManager.getAddonByID("theme-xpi@tests.mozilla.org", function(aAddon) {
           isnot(aAddon, null, "Should have installed the test theme.");
 
           // In order to switch themes while the test is running we turn on dynamic
           // theme switching. This means the test isn't exactly correct but should
           // do some good
           Services.prefs.setBoolPref("extensions.dss.enabled", true);
 
--- a/browser/base/content/test/general/browser_bug676619.js
+++ b/browser/base/content/test/general/browser_bug676619.js
@@ -59,29 +59,29 @@ function test() {
   });
 
   gBrowser.loadURI("http://mochi.test:8888/browser/browser/base/content/test/general/download_page.html");
 }
 
 
 function addWindowListener(aURL, aCallback) {
   Services.wm.addListener({
-    onOpenWindow: function(aXULWindow) {
+    onOpenWindow(aXULWindow) {
       info("window opened, waiting for focus");
       Services.wm.removeListener(this);
 
       var domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                 .getInterface(Ci.nsIDOMWindow);
       waitForFocus(function() {
         is(domwindow.document.location.href, aURL, "should have seen the right window open");
         aCallback(domwindow);
       }, domwindow);
     },
-    onCloseWindow: function(aXULWindow) { },
-    onWindowTitleChange: function(aXULWindow, aNewTitle) { }
+    onCloseWindow(aXULWindow) { },
+    onWindowTitleChange(aXULWindow, aNewTitle) { }
   });
 }
 
 // This listens for the next opened tab and checks it is of the right url.
 // opencallback is called when the new tab is fully loaded
 // closecallback is called when the tab is closed
 function TabOpenListener(url, opencallback, closecallback) {
   this.url = url;
@@ -93,17 +93,17 @@ function TabOpenListener(url, opencallba
 
 TabOpenListener.prototype = {
   url: null,
   opencallback: null,
   closecallback: null,
   tab: null,
   browser: null,
 
-  handleEvent: function(event) {
+  handleEvent(event) {
     if (event.type == "TabOpen") {
       gBrowser.tabContainer.removeEventListener("TabOpen", this, false);
       this.tab = event.originalTarget;
       this.browser = this.tab.linkedBrowser;
       BrowserTestUtils.browserLoaded(this.browser, false, this.url).then(() => {
         this.tab.addEventListener("TabClose", this, false);
         var url = this.browser.currentURI.spec;
         is(url, this.url, "Should have opened the correct tab");
--- a/browser/base/content/test/general/browser_bug734076.js
+++ b/browser/base/content/test/general/browser_bug734076.js
@@ -10,75 +10,75 @@ add_task(function* ()
 
   let writeDomainURL = encodeURI("data:text/html,<script>document.write(document.domain);</script>");
 
   let tests = [
     {
       name: "view background image",
       url: "http://mochi.test:8888/",
       element: "body",
-      go: function() {
-        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
+      go() {
+        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) {
           let contentBody = content.document.body;
           contentBody.style.backgroundImage = "url('" + arg.writeDomainURL + "')";
 
           return "context-viewbgimage";
         });
       },
-      verify: function() {
+      verify() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for view background image");
         });
       }
     },
     {
       name: "view image",
       url: "http://mochi.test:8888/",
       element: "img",
-      go: function() {
-        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
+      go() {
+        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) {
           let doc = content.document;
           let img = doc.createElement("img");
           img.height = 100;
           img.width = 100;
           img.setAttribute("src", arg.writeDomainURL);
           doc.body.insertBefore(img, doc.body.firstChild);
 
           return "context-viewimage";
         });
       },
-      verify: function() {
+      verify() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for view image");
         });
       }
     },
     {
       name: "show only this frame",
       url: "http://mochi.test:8888/",
       element: "iframe",
-      go: function() {
-        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
+      go() {
+        return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) {
           let doc = content.document;
           let iframe = doc.createElement("iframe");
           iframe.setAttribute("src", arg.writeDomainURL);
           doc.body.insertBefore(iframe, doc.body.firstChild);
 
           // Wait for the iframe to load.
           return new Promise(resolve => {
             iframe.addEventListener("load", function onload() {
               iframe.removeEventListener("load", onload, true);
               resolve("context-showonlythisframe");
             }, true);
           });
         });
       },
-      verify: function() {
+      verify() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for 'show only this frame'");
         });
       }
     }
   ];
 
--- a/browser/base/content/test/general/browser_contentAltClick.js
+++ b/browser/base/content/test/general/browser_contentAltClick.js
@@ -49,17 +49,17 @@ add_task(function* test_alt_click()
   yield setup();
 
   let downloadList = yield Downloads.getList(Downloads.ALL);
   let downloads = [];
   let downloadView;
   // When 1 download has been attempted then resolve the promise.
   let finishedAllDownloads = new Promise( (resolve) => {
     downloadView = {
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         downloads.push(aDownload);
         resolve();
       },
     };
   });
   yield downloadList.addView(downloadView);
   yield BrowserTestUtils.synthesizeMouseAtCenter("#commonlink", {altKey: true}, gBrowser.selectedBrowser);
 
@@ -78,17 +78,17 @@ add_task(function* test_alt_click_on_xli
   yield setup();
 
   let downloadList = yield Downloads.getList(Downloads.ALL);
   let downloads = [];
   let downloadView;
   // When all 2 downloads have been attempted then resolve the promise.
   let finishedAllDownloads = new Promise( (resolve) => {
     downloadView = {
-      onDownloadAdded: function(aDownload) {
+      onDownloadAdded(aDownload) {
         downloads.push(aDownload);
         if (downloads.length == 2) {
           resolve();
         }
       },
     };
   });
   yield downloadList.addView(downloadView);
--- a/browser/base/content/test/general/browser_contentAreaClick.js
+++ b/browser/base/content/test/general/browser_contentAreaClick.js
@@ -13,146 +13,146 @@
  * the event is collected by a click handler that ensures that contentAreaClick
  * correctly prevent default events, and follows the correct code path.
  */
 
 var gTests = [
 
   {
     desc: "Simple left click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: {},
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [],
     preventDefault: false,
   },
 
   {
     desc: "Ctrl/Cmd left click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: { ctrlKey: true,
              metaKey: true },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   // The next test was once handling feedService.forcePreview().  Now it should
   // just be like Alt click.
   {
     desc: "Shift+Alt left click",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { shiftKey: true,
              altKey: true },
     targets: [ "commonlink", "maplink" ],
     expectedInvokedMethods: [ "gatherTextUnder", "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Shift+Alt left click on XLinks",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { shiftKey: true,
              altKey: true },
     targets: [ "mathxlink", "svgxlink"],
     expectedInvokedMethods: [ "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Shift click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: { shiftKey: true },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Alt click",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { altKey: true },
     targets: [ "commonlink", "maplink" ],
     expectedInvokedMethods: [ "gatherTextUnder", "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Alt click on XLinks",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.altClickSave", true);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.altClickSave");
     },
     event: { altKey: true },
     targets: [ "mathxlink", "svgxlink" ],
     expectedInvokedMethods: [ "saveURL" ],
     preventDefault: true,
   },
 
   {
     desc: "Panel click",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: {},
     targets: [ "panellink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "loadURI" ],
     preventDefault: true,
   },
 
   {
     desc: "Simple middle click opentab",
-    setup: function() {},
-    clean: function() {},
+    setup() {},
+    clean() {},
     event: { button: 1 },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Simple middle click openwin",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("browser.tabs.opentabfor.middleclick", false);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("browser.tabs.opentabfor.middleclick");
     },
     event: { button: 1 },
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ],
     preventDefault: true,
   },
 
   {
     desc: "Middle mouse paste",
-    setup: function() {
+    setup() {
       gPrefService.setBoolPref("middlemouse.contentLoadURL", true);
       gPrefService.setBoolPref("general.autoScroll", false);
     },
-    clean: function() {
+    clean() {
       gPrefService.clearUserPref("middlemouse.contentLoadURL");
       gPrefService.clearUserPref("general.autoScroll");
     },
     event: { button: 1 },
     targets: [ "emptylink" ],
     expectedInvokedMethods: [ "middleMousePaste" ],
     preventDefault: true,
   },
@@ -194,17 +194,17 @@ function test() {
         executeSoon(runNextTest);
       }, gTestWin.content, true);
     }, gTestWin);
   });
 }
 
 // Click handler used to steal click events.
 var gClickHandler = {
-  handleEvent: function(event) {
+  handleEvent(event) {
     let linkId = event.target.id || event.target.localName;
     is(event.type, "click",
        gCurrentTest.desc + ":Handler received a click event on " + linkId);
 
     let isPanelClick = linkId == "panellink";
     gTestWin.contentAreaClick(event, isPanelClick);
     let prevent = event.defaultPrevented;
     is(prevent, gCurrentTest.preventDefault,
--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -190,38 +190,38 @@ add_task(function* cycleSuggestions() {
   yield msg("key", { key: "x", waitForSuggestions: true });
 
   let cycle = Task.async(function* (aSelectedButtonIndex) {
     let modifiers = {
       shiftKey: true,
       accelKey: true,
     };
 
-    let state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    let state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_DOWN", modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex);
 
-    state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+    state = yield msg("key", { key: "VK_UP", modifiers });
     checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex);
   });
 
   yield cycle();
 
   // Repeat with a one-off selected.
   let state = yield msg("key", "VK_TAB");
   checkState(state, "x", ["xfoo", "xbar"], 2);
@@ -244,48 +244,48 @@ add_task(function* cycleOneOffs() {
   let state = yield msg("key", "VK_DOWN");
   state = yield msg("key", "VK_DOWN");
   checkState(state, "xbar", ["xfoo", "xbar"], 1);
 
   let modifiers = {
     altKey: true,
   };
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1);
 
   // If the settings button is selected, pressing alt+up/down should select the
   // last/first one-off respectively (and deselect the settings button).
   yield msg("key", "VK_TAB");
   yield msg("key", "VK_TAB");
   state = yield msg("key", "VK_TAB"); // Settings button selected.
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 2);
 
-  state = yield msg("key", { key: "VK_UP", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_UP", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 1);
 
   state = yield msg("key", "VK_TAB");
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 2);
 
-  state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers });
+  state = yield msg("key", { key: "VK_DOWN", modifiers });
   checkState(state, "xbar", ["xfoo", "xbar"], 1, 0);
 
   yield msg("removeLastOneOff");
   yield msg("reset");
 });
 
 add_task(function* mouse() {
   yield setUp();
@@ -413,17 +413,17 @@ add_task(function* search() {
   yield setUp();
 
   let modifiers = {};
   ["altKey", "ctrlKey", "metaKey", "shiftKey"].forEach(k => modifiers[k] = true);
 
   // Test typing a query and pressing enter.
   let p = msg("waitForSearch");
   yield msg("key", { key: "x", waitForSuggestions: true });
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   let mesg = yield p;
   let eventData = {
     engineName: TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME,
     searchString: "x",
     healthReportKey: "test",
     searchPurpose: "test",
     originalEvent: modifiers,
   };
@@ -432,17 +432,17 @@ add_task(function* search() {
   yield promiseTab();
   yield setUp();
 
   // Test typing a query, then selecting a suggestion and pressing enter.
   p = msg("waitForSearch");
   yield msg("key", { key: "x", waitForSuggestions: true });
   yield msg("key", "VK_DOWN");
   yield msg("key", "VK_DOWN");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo";
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
   eventData.selection = {
     index: 1,
     kind: "key",
   }
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
@@ -450,77 +450,77 @@ add_task(function* search() {
   yield promiseTab();
   yield setUp();
 
   // Test typing a query, then selecting a one-off button and pressing enter.
   p = msg("waitForSearch");
   yield msg("key", { key: "x", waitForSuggestions: true });
   yield msg("key", "VK_UP");
   yield msg("key", "VK_UP");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   delete eventData.selection;
   eventData.searchString = "x";
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test typing a query and clicking the search engine header.
   p = msg("waitForSearch");
   modifiers.button = 0;
   yield msg("key", { key: "x", waitForSuggestions: true });
   yield msg("mousemove", -1);
-  yield msg("click", { eltIdx: -1, modifiers: modifiers });
+  yield msg("click", { eltIdx: -1, modifiers });
   mesg = yield p;
   eventData.originalEvent = modifiers;
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test typing a query and then clicking a suggestion.
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("mousemove", 1);
-  yield msg("click", { eltIdx: 1, modifiers: modifiers });
+  yield msg("click", { eltIdx: 1, modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo";
   eventData.selection = {
     index: 1,
     kind: "mouse",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test typing a query and then clicking a one-off button.
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("mousemove", 3);
-  yield msg("click", { eltIdx: 3, modifiers: modifiers });
+  yield msg("click", { eltIdx: 3, modifiers });
   mesg = yield p;
   eventData.searchString = "x";
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME;
   delete eventData.selection;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
   yield setUp();
 
   // Test selecting a suggestion, then clicking a one-off without deselecting the
   // suggestion.
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("mousemove", 1);
   yield msg("mousemove", 3);
-  yield msg("click", { eltIdx: 3, modifiers: modifiers });
+  yield msg("click", { eltIdx: 3, modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo"
   eventData.selection = {
     index: 1,
     kind: "mouse",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
@@ -529,17 +529,17 @@ add_task(function* search() {
 
   // Same as above, but with the keyboard.
   delete modifiers.button;
   yield msg("key", { key: "x", waitForSuggestions: true });
   p = msg("waitForSearch");
   yield msg("key", "VK_DOWN");
   yield msg("key", "VK_DOWN");
   yield msg("key", "VK_TAB");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   eventData.selection = {
     index: 1,
     kind: "key",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
@@ -549,17 +549,17 @@ add_task(function* search() {
   let state = yield msg("startComposition", { data: "" });
   checkState(state, "", [], -1);
   state = yield msg("changeComposition", { data: "x", waitForSuggestions: true });
   checkState(state, "x", [{ str: "x", type: "formHistory" },
                           { str: "xfoo", type: "formHistory" }, "xbar"], -1);
   yield msg("commitComposition");
   delete modifiers.button;
   p = msg("waitForSearch");
-  yield msg("key", { key: "VK_RETURN", modifiers: modifiers });
+  yield msg("key", { key: "VK_RETURN", modifiers });
   mesg = yield p;
   eventData.searchString = "x"
   eventData.originalEvent = modifiers;
   eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME;
   delete eventData.selection;
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
 
   yield promiseTab();
@@ -578,17 +578,17 @@ add_task(function* search() {
 
   // Mouse over the second suggestion.
   state = yield msg("mousemove", 1);
   checkState(state, "x", [{ str: "x", type: "formHistory" },
                           { str: "xfoo", type: "formHistory" }, "xbar"], 1);
 
   modifiers.button = 0;
   p = msg("waitForSearch");
-  yield msg("click", { eltIdx: 1, modifiers: modifiers });
+  yield msg("click", { eltIdx: 1, modifiers });
   mesg = yield p;
   eventData.searchString = "xfoo";
   eventData.originalEvent = modifiers;
   eventData.selection = {
     index: 1,
     kind: "mouse",
   };
   SimpleTest.isDeeply(eventData, mesg, "Search event data");
@@ -657,18 +657,18 @@ function setUp(aNoEngine) {
       gDidInitialSetUp = true;
     }
     yield msg("focus");
   });
 }
 
 function msg(type, data = null) {
   gMsgMan.sendAsyncMessage(TEST_MSG, {
-    type: type,
-    data: data,
+    type,
+    data,
   });
   let deferred = Promise.defer();
   gMsgMan.addMessageListener(TEST_MSG, function onMsg(msgObj) {
     if (msgObj.data.type != type) {
       return;
     }
     gMsgMan.removeMessageListener(TEST_MSG, onMsg);
     deferred.resolve(msgObj.data.data);
--- a/browser/base/content/test/general/browser_contextmenu.js
+++ b/browser/base/content/test/general/browser_contextmenu.js
@@ -495,17 +495,17 @@ add_task(function* test_contenteditable(
     ],
     {waitForSpellCheck: true}
   );
   */
 });
 
 add_task(function* test_copylinkcommand() {
   yield test_contextmenu("#test-link", null, {
-    postCheckContextMenuFn: function*() {
+    *postCheckContextMenuFn() {
       document.commandDispatcher
               .getControllerForCommand("cmd_copyLink")
               .doCommand("cmd_copyLink");
 
       // The easiest way to check the clipboard is to paste the contents
       // into a textbox.
       yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
         let doc = content.document;
@@ -557,17 +557,17 @@ add_task(function* test_pagemenu() {
      ...(hasPocket ? ["context-pocket", true] : []),
      "---",                  null,
      "context-viewbgimage",  false,
      "context-selectall",    true,
      "---",                  null,
      "context-viewsource",   true,
      "context-viewinfo",     true
     ],
-    {postCheckContextMenuFn: function*() {
+    {*postCheckContextMenuFn() {
       let item = contextMenu.getElementsByAttribute("generateditemid", "1")[0];
       ok(item, "Got generated XUL menu item");
       item.doCommand();
       yield ContentTask.spawn(gBrowser.selectedBrowser, null, function*() {
         let pagemenu = content.document.getElementById("test-pagemenu");
         Assert.ok(!pagemenu.hasAttribute("hopeless"), "attribute got removed");
       });
     }
@@ -815,21 +815,21 @@ add_task(function* test_click_to_play_bl
      "---",                  null,
      "context-viewbgimage",  false,
      "context-selectall",    true,
      "---",                  null,
      "context-viewsource",   true,
      "context-viewinfo",     true
     ],
     {
-      preCheckContextMenuFn: function*() {
+      *preCheckContextMenuFn() {
         pushPrefs(["plugins.click_to_play", true]);
         setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY);
       },
-      postCheckContextMenuFn: function*() {
+      *postCheckContextMenuFn() {
         getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED;
       }
     }
   );
 });
 
 add_task(function* test_longdesc() {
   yield test_contextmenu("#test-longdesc",
--- a/browser/base/content/test/general/browser_devedition.js
+++ b/browser/base/content/test/general/browser_devedition.js
@@ -75,17 +75,17 @@ add_task(function* testDevtoolsTheme() {
     "The documentElement has 'light' as a default for the devtoolstheme attribute");
   ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme.");
   ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
      "The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
 });
 
 function dummyLightweightTheme(id) {
   return {
-    id: id,
+    id,
     name: id,
     headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
     iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
     textcolor: "red",
     accentcolor: "blue"
   };
 }
 
--- a/browser/base/content/test/general/browser_documentnavigation.js
+++ b/browser/base/content/test/general/browser_documentnavigation.js
@@ -55,17 +55,17 @@ function* expectFocusOnF6(backward, expe
 
         const contentFM = Components.classes["@mozilla.org/focus-manager;1"].
                             getService(Components.interfaces.nsIFocusManager);
         let details = contentFM.focusedWindow.document.documentElement.id;
         if (contentFM.focusedElement) {
           details += "," + contentFM.focusedElement.id;
         }
 
-        sendSyncMessage("BrowserTest:FocusChanged", { details : details });
+        sendSyncMessage("BrowserTest:FocusChanged", { details });
       }, true);
     });
   }
 
   EventUtils.synthesizeKey("VK_F6", { shiftKey: backward });
   yield focusPromise;
 
   if (typeof expectedElement == "string") {
--- a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
+++ b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
@@ -109,17 +109,17 @@ var gTests = [
     affectsFullscreenMode: false,
     exitFunc: () => {
       executeSoon(() => EventUtils.synthesizeKey("VK_ESCAPE", {}));
     }
   },
   {
     desc: "F11 key",
     affectsFullscreenMode: true,
-    exitFunc: function() {
+    exitFunc() {
       executeSoon(() => EventUtils.synthesizeKey("VK_F11", {}));
     }
   }
 ];
 
 function checkState(expectedStates, contentStates) {
   is(contentStates.inDOMFullscreen, expectedStates.inDOMFullscreen,
      "The DOM fullscreen state of the content should match");
--- a/browser/base/content/test/general/browser_e10s_about_process.js
+++ b/browser/base/content/test/general/browser_e10s_about_process.js
@@ -22,46 +22,46 @@ const TEST_MODULES = [
   CANREMOTE,
   MUSTREMOTE
 ]
 
 function AboutModule() {
 }
 
 AboutModule.prototype = {
-  newChannel: function(aURI, aLoadInfo) {
+  newChannel(aURI, aLoadInfo) {
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
   },
 
-  getURIFlags: function(aURI) {
+  getURIFlags(aURI) {
     for (let module of TEST_MODULES) {
       if (aURI.path.startsWith(module.path)) {
         return module.flags;
       }
     }
 
     ok(false, "Called getURIFlags for an unknown page " + aURI.spec);
     return 0;
   },
 
-  getIndexedDBOriginPostfix: function(aURI) {
+  getIndexedDBOriginPostfix(aURI) {
     return null;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule])
 };
 
 var AboutModuleFactory = {
-  createInstance: function(aOuter, aIID) {
+  createInstance(aOuter, aIID) {
     if (aOuter)
       throw Components.results.NS_ERROR_NO_AGGREGATION;
     return new AboutModule().QueryInterface(aIID);
   },
 
-  lockFactory: function(aLock) {
+  lockFactory(aLock) {
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory])
 };
 
 add_task(function* init() {
   let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -61,128 +61,128 @@ function runNextTest() {
 
 // Test for window.open() with no feature.
 function test_open() {
   waitForTabOpen({
     message: {
       title: "test_open",
       param: "",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with width/height.
 function test_open_with_size() {
   waitForTabOpen({
     message: {
       title: "test_open_with_size",
       param: "width=400,height=400",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with top/left.
 function test_open_with_pos() {
   waitForTabOpen({
     message: {
       title: "test_open_with_pos",
       param: "top=200,left=200",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with outerWidth/Height.
 function test_open_with_outerSize() {
   let [outerWidth, outerHeight] = [window.outerWidth, window.outerHeight];
   waitForTabOpen({
     message: {
       title: "test_open_with_outerSize",
       param: "outerWidth=200,outerHeight=200",
     },
-    successFn: function() {
+    successFn() {
       is(window.outerWidth, outerWidth, "Don't change window.outerWidth.");
       is(window.outerHeight, outerHeight, "Don't change window.outerHeight.");
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with innerWidth/Height.
 function test_open_with_innerSize() {
   let [innerWidth, innerHeight] = [window.innerWidth, window.innerHeight];
   waitForTabOpen({
     message: {
       title: "test_open_with_innerSize",
       param: "innerWidth=200,innerHeight=200",
     },
-    successFn: function() {
+    successFn() {
       is(window.innerWidth, innerWidth, "Don't change window.innerWidth.");
       is(window.innerHeight, innerHeight, "Don't change window.innerHeight.");
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open() with dialog.
 function test_open_with_dialog() {
   waitForTabOpen({
     message: {
       title: "test_open_with_dialog",
       param: "dialog=yes",
     },
-    finalizeFn: function() {},
+    finalizeFn() {},
   });
 }
 
 // Test for window.open()
 // when "browser.link.open_newwindow" is nsIBrowserDOMWindow.OPEN_NEWWINDOW
 function test_open_when_open_new_window_by_pref() {
   const PREF_NAME = "browser.link.open_newwindow";
   Services.prefs.setIntPref(PREF_NAME, Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW);
   is(Services.prefs.getIntPref(PREF_NAME), Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW,
      PREF_NAME + " is nsIBrowserDOMWindow.OPEN_NEWWINDOW at this time");
 
   waitForTabOpen({
     message: {
       title: "test_open_when_open_new_window_by_pref",
       param: "width=400,height=400",
     },
-    finalizeFn: function() {
+    finalizeFn() {
       Services.prefs.clearUserPref(PREF_NAME);
     },
   });
 }
 
 // Test for the pref, "browser.link.open_newwindow.disabled_in_fullscreen"
 function test_open_with_pref_to_disable_in_fullscreen() {
   Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, false);
 
   waitForWindowOpen({
     message: {
       title: "test_open_with_pref_disabled_in_fullscreen",
       param: "width=400,height=400",
     },
-    finalizeFn: function() {
+    finalizeFn() {
       Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, true);
     },
   });
 }
 
 
 // Test for window.open() called from chrome context.
 function test_open_from_chrome() {
   waitForWindowOpenFromChrome({
     message: {
       title: "test_open_from_chrome",
       param: "",
     },
-    finalizeFn: function() {}
+    finalizeFn() {}
   });
 }
 
 function waitForTabOpen(aOptions) {
   let message = aOptions.message;
 
   if (!message.title) {
     ok(false, "Can't get message.title.");
@@ -246,17 +246,17 @@ function waitForWindowOpen(aOptions) {
     aOptions.finalizeFn();
 
     info("Finished: " + message.title);
     runNextTest();
   };
 
   let listener = new WindowListener(message.title, getBrowserURL(), {
     onSuccess: aOptions.successFn,
-    onFinalize: onFinalize,
+    onFinalize,
   });
   Services.wm.addListener(listener);
 
   executeWindowOpenInContent({
     uri: url,
     title: message.title,
     option: message.param,
   });
@@ -287,17 +287,17 @@ function waitForWindowOpenFromChrome(aOp
     aOptions.finalizeFn();
 
     info("Finished: " + message.title);
     runNextTest();
   };
 
   let listener = new WindowListener(message.title, getBrowserURL(), {
     onSuccess: aOptions.successFn,
-    onFinalize: onFinalize,
+    onFinalize,
   });
   Services.wm.addListener(listener);
 
   window.open(url, message.title, message.option);
 }
 
 function WindowListener(aTitle, aUrl, aCallBackObj) {
   this.test_title = aTitle;
@@ -307,17 +307,17 @@ function WindowListener(aTitle, aUrl, aC
 }
 WindowListener.prototype = {
 
   test_title: null,
   test_url: null,
   callback_onSuccess: null,
   callBack_onFinalize: null,
 
-  onOpenWindow: function(aXULWindow) {
+  onOpenWindow(aXULWindow) {
     Services.wm.removeListener(this);
 
     let domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                     .getInterface(Ci.nsIDOMWindow);
     let onLoad = aEvent => {
       is(domwindow.document.location.href, this.test_url,
         "Opened Window is expected: " + this.test_title);
       if (this.callback_onSuccess) {
@@ -335,13 +335,13 @@ WindowListener.prototype = {
       }
       else {
         domwindow.close();
         executeSoon(this.callBack_onFinalize);
       }
     };
     domwindow.addEventListener("load", onLoad, true);
   },
-  onCloseWindow: function(aXULWindow) {},
-  onWindowTitleChange: function(aXULWindow, aNewTitle) {},
+  onCloseWindow(aXULWindow) {},
+  onWindowTitleChange(aXULWindow, aNewTitle) {},
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener,
                                          Ci.nsISupports]),
 };
--- a/browser/base/content/test/general/browser_fxa_oauth.js
+++ b/browser/base/content/test/general/browser_fxa_oauth.js
@@ -16,17 +16,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 const HTTP_PATH = "http://example.com";
 const HTTP_ENDPOINT = "/browser/browser/base/content/test/general/browser_fxa_oauth.html";
 const HTTP_ENDPOINT_WITH_KEYS = "/browser/browser/base/content/test/general/browser_fxa_oauth_with_keys.html";
 
 var gTests = [
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
         let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html";
         let queryStrings = [
           "action=signin",
           "client_id=client_id",
           "scope=",
           "state=state",
@@ -69,17 +69,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow when forcing auth",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
         let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html";
         let queryStrings = [
           "action=force_auth",
           "client_id=client_id",
           "scope=",
           "state=state",
@@ -126,17 +126,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should receive an error when there's a state mismatch",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have passed in the expected non-matching state value.
           let queryString = gBrowser.currentURI.spec.split("?")[1];
@@ -164,17 +164,17 @@ var gTests = [
         };
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should be able to request keys during OAuth flow",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
@@ -206,17 +206,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should not receive keys if not explicitly requested",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should not have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
@@ -247,17 +247,17 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should receive an error if keys could not be obtained",
-    run: function() {
+    run() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
         waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
--- a/browser/base/content/test/general/browser_fxa_web_channel.js
+++ b/browser/base/content/test/general/browser_fxa_web_channel.js
@@ -18,40 +18,40 @@ var {FxAccountsWebChannel} = Components.
 
 const TEST_HTTP_PATH = "http://example.com";
 const TEST_BASE_URL = TEST_HTTP_PATH + "/browser/browser/base/content/test/general/browser_fxa_web_channel.html";
 const TEST_CHANNEL_ID = "account_updates_test";
 
 var gTests = [
   {
     desc: "FxA Web Channel - should receive message about profile changes",
-    run: function* () {
+    *run() {
       let client = new FxAccountsWebChannel({
         content_uri: TEST_HTTP_PATH,
         channel_id: TEST_CHANNEL_ID,
       });
       let promiseObserver = new Promise((resolve, reject) => {
         makeObserver(FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION, function(subject, topic, data) {
           Assert.equal(data, "abc123");
           client.tearDown();
           resolve();
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?profile_change"
       }, function* () {
         yield promiseObserver;
       });
     }
   },
   {
     desc: "fxa web channel - login messages should notify the fxAccounts object",
-    run: function* () {
+    *run() {
 
       let promiseLogin = new Promise((resolve, reject) => {
         let login = (accountData) => {
           Assert.equal(typeof accountData.authAt, 'number');
           Assert.equal(accountData.email, 'testuser@testuser.com');
           Assert.equal(accountData.keyFetchToken, 'key_fetch_token');
           Assert.equal(accountData.sessionToken, 'session_token');
           Assert.equal(accountData.uid, 'uid');
@@ -61,32 +61,32 @@ var gTests = [
           client.tearDown();
           resolve();
         };
 
         let client = new FxAccountsWebChannel({
           content_uri: TEST_HTTP_PATH,
           channel_id: TEST_CHANNEL_ID,
           helpers: {
-            login: login
+            login
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?login"
       }, function* () {
         yield promiseLogin;
       });
     }
   },
   {
     desc: "fxa web channel - can_link_account messages should respond",
-    run: function* () {
+    *run() {
       let properUrl = TEST_BASE_URL + "?can_link_account";
 
       let promiseEcho = new Promise((resolve, reject) => {
 
         let webChannelOrigin = Services.io.newURI(properUrl, null, null);
         // responses sent to content are echoed back over the
         // `fxaccounts_webchannel_response_echo` channel. Ensure the
         // fxaccounts:can_link_account message is responded to.
@@ -109,73 +109,73 @@ var gTests = [
             shouldAllowRelink(acctName) {
               return acctName === 'testuser@testuser.com';
             }
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: properUrl
       }, function* () {
         yield promiseEcho;
       });
     }
   },
   {
     desc: "fxa web channel - logout messages should notify the fxAccounts object",
-    run: function* () {
+    *run() {
       let promiseLogout = new Promise((resolve, reject) => {
         let logout = (uid) => {
           Assert.equal(uid, 'uid');
 
           client.tearDown();
           resolve();
         };
 
         let client = new FxAccountsWebChannel({
           content_uri: TEST_HTTP_PATH,
           channel_id: TEST_CHANNEL_ID,
           helpers: {
-            logout: logout
+            logout
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?logout"
       }, function* () {
         yield promiseLogout;
       });
     }
   },
   {
     desc: "fxa web channel - delete messages should notify the fxAccounts object",
-    run: function* () {
+    *run() {
       let promiseDelete = new Promise((resolve, reject) => {
         let logout = (uid) => {
           Assert.equal(uid, 'uid');
 
           client.tearDown();
           resolve();
         };
 
         let client = new FxAccountsWebChannel({
           content_uri: TEST_HTTP_PATH,
           channel_id: TEST_CHANNEL_ID,
           helpers: {
-            logout: logout
+            logout
           }
         });
       });
 
       yield BrowserTestUtils.withNewTab({
-        gBrowser: gBrowser,
+        gBrowser,
         url: TEST_BASE_URL + "?delete"
       }, function* () {
         yield promiseDelete;
       });
     }
   }
 ]; // gTests
 
--- a/browser/base/content/test/general/browser_fxaccounts.js
+++ b/browser/base/content/test/general/browser_fxaccounts.js
@@ -11,26 +11,26 @@ const TEST_ROOT = "http://example.com/br
 
 // instrument gFxAccounts to send observer notifications when it's done
 // what it does.
 (function() {
   let unstubs = {}; // The original functions we stub out.
 
   // The stub functions.
   let stubs = {
-    updateAppMenuItem: function() {
+    updateAppMenuItem() {
       return unstubs['updateAppMenuItem'].call(gFxAccounts).then(() => {
         Services.obs.notifyObservers(null, "test:browser_fxaccounts:updateAppMenuItem", null);
       });
     },
     // Opening preferences is trickier than it should be as leaks are reported
     // due to the promises it fires off at load time  and there's no clear way to
     // know when they are done.
     // So just ensure openPreferences is called rather than whether it opens.
-    openPreferences: function() {
+    openPreferences() {
       Services.obs.notifyObservers(null, "test:browser_fxaccounts:openPreferences", null);
     }
   };
 
   for (let name in stubs) {
     unstubs[name] = gFxAccounts[name];
     gFxAccounts[name] = stubs[name];
   }
@@ -232,17 +232,17 @@ function promiseTabUnloaded(tab)
 function setSignedInUser(verified) {
   let data = {
     email: "foo@example.com",
     uid: "1234@lcip.org",
     assertion: "foobar",
     sessionToken: "dead",
     kA: "beef",
     kB: "cafe",
-    verified: verified,
+    verified,
 
     oauthTokens: {
       // a token for the profile server.
       profile: "key value",
     }
   }
   return fxAccounts.setSignedInUser(data);
 }
--- a/browser/base/content/test/general/browser_getshortcutoruri.js
+++ b/browser/base/content/test/general/browser_getshortcutoruri.js
@@ -14,17 +14,17 @@ function getPostDataString(aIS) {
 function keywordResult(aURL, aPostData, aIsUnsafe) {
   this.url = aURL;
   this.postData = aPostData;
   this.isUnsafe = aIsUnsafe;
 }
 
 function keyWordData() {}
 keyWordData.prototype = {
-  init: function(aKeyWord, aURL, aPostData, aSearchWord) {
+  init(aKeyWord, aURL, aPostData, aSearchWord) {
     this.keyword = aKeyWord;
     this.uri = makeURI(aURL);
     this.postData = aPostData;
     this.searchWord = aSearchWord;
 
     this.method = (this.postData ? "POST" : "GET");
   }
 }
--- a/browser/base/content/test/general/browser_homeDrop.js
+++ b/browser/base/content/test/general/browser_homeDrop.js
@@ -27,17 +27,17 @@ add_task(function*() {
 
     let setHomepageDialog = yield setHomepageDialogPromise;
     ok(true, "dialog appeared in response to home button drop");
     yield BrowserTestUtils.waitForEvent(setHomepageDialog, "load", false);
 
     let setHomepagePromise = new Promise(function(resolve) {
       let observer = {
         QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
-        observe: function(subject, topic, data) {
+        observe(subject, topic, data) {
           is(topic, "nsPref:changed", "observed correct topic");
           is(data, HOMEPAGE_PREF, "observed correct data");
           let modified = Services.prefs.getComplexValue(HOMEPAGE_PREF,
                                                         Ci.nsISupportsString);
           is(modified.data, homepage, "homepage is set correctly");
           Services.prefs.removeObserver(HOMEPAGE_PREF, observer);
 
           Services.prefs.setComplexValue(HOMEPAGE_PREF,
@@ -52,17 +52,17 @@ add_task(function*() {
     setHomepageDialog.document.documentElement.acceptDialog();
 
     yield setHomepagePromise;
   }
 
   function dropInvalidURI() {
     return new Promise(resolve => {
       let consoleListener = {
-        observe: function(m) {
+        observe(m) {
           if (m.message.includes("NS_ERROR_DOM_BAD_URI")) {
             ok(true, "drop was blocked");
             resolve();
           }
         }
       };
       Services.console.registerListener(consoleListener);
       registerCleanupFunction(function() {
--- a/browser/base/content/test/general/browser_keywordSearch.js
+++ b/browser/base/content/test/general/browser_keywordSearch.js
@@ -15,17 +15,17 @@ var gTests = [
     searchURL: Services.search.defaultEngine.getSubmission("foo", null, "keyword").uri.spec
   }
 ];
 
 function test() {
   waitForExplicitFinish();
 
   let windowObserver = {
-    observe: function(aSubject, aTopic, aData) {
+    observe(aSubject, aTopic, aData) {
       if (aTopic == "domwindowopened") {
         ok(false, "Alert window opened");
         let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
         win.addEventListener("load", function() {
           win.removeEventListener("load", arguments.callee, false);
           win.close();
         }, false);
         executeSoon(finish);
--- a/browser/base/content/test/general/browser_plainTextLinks.js
+++ b/browser/base/content/test/general/browser_plainTextLinks.js
@@ -114,17 +114,17 @@ add_task(function *() {
       testLinkExpected("http://open-suse.ru/", "Linkified text should open the correct link");
     },
     () => testExpected(true, "Link options should not show for 'open-suse.ru)'")
   ];
 
   let contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
 
   for (let testid = 0; testid < checks.length; testid++) {
-    let menuPosition = yield ContentTask.spawn(gBrowser.selectedBrowser, { testid: testid }, function* (arg) {
+    let menuPosition = yield ContentTask.spawn(gBrowser.selectedBrowser, { testid }, function* (arg) {
       let range = content.tests[arg.testid]();
 
       // Get the range of the selection and determine its coordinates. These
       // coordinates will be returned to the parent process and the context menu
       // will be opened at that location.
       let rangeRect = range.getBoundingClientRect();
       return [rangeRect.x + 3, rangeRect.y + 3];
     });
--- a/browser/base/content/test/general/browser_restore_isAppTab.js
+++ b/browser/base/content/test/general/browser_restore_isAppTab.js
@@ -9,17 +9,17 @@ function getMinidumpDirectory() {
   let dir = Services.dirsvc.get('ProfD', Ci.nsIFile);
   dir.append("minidumps");
   return dir;
 }
 
 // This observer is needed so we can clean up all evidence of the crash so
 // the testrunner thinks things are peachy.
 var CrashObserver = {
-  observe: function(subject, topic, data) {
+  observe(subject, topic, data) {
     is(topic, 'ipc:content-shutdown', 'Received correct observer topic.');
     ok(subject instanceof Ci.nsIPropertyBag2,
        'Subject implements nsIPropertyBag2.');
     // we might see this called as the process terminates due to previous tests.
     // We are only looking for "abnormal" exits...
     if (!subject.hasKey("abnormal")) {
       info("This is a normal termination and isn't the one we are looking for...");
       return;
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -26,17 +26,17 @@ function promiseFormHistoryRemoved() {
   }, "satchel-storage-changed", false);
   return deferred.promise;
 }
 
 function promiseDownloadRemoved(list) {
   let deferred = Promise.defer();
 
   let view = {
-    onDownloadRemoved: function(download) {
+    onDownloadRemoved(download) {
       list.removeView(view);
       deferred.resolve();
     }
   };
 
   list.addView(view);
 
   return deferred.promise;
@@ -53,21 +53,21 @@ function countEntries(name, message, che
   let deferred = Promise.defer();
 
   var obj = {};
   if (name !== null)
     obj.fieldname = name;
 
   let count;
   FormHistory.count(obj, { handleResult: result => count = result,
-                           handleError: function(error) {
+                           handleError(error) {
                              deferred.reject(error)
                              throw new Error("Error occurred searching form history: " + error);
                            },
-                           handleCompletion: function(reason) {
+                           handleCompletion(reason) {
                              if (!reason) {
                                check(count, message);
                                deferred.resolve();
                              }
                            },
                          });
 
   return deferred.promise;
@@ -488,33 +488,33 @@ function setupHistory() {
 
 function* setupFormHistory() {
 
   function searchEntries(terms, params) {
     let deferred = Promise.defer();
 
     let results = [];