Bug 1322343 - Enable no-unused-vars in the local scope in toolkit/.eslintrc.js. r=mossop
authorMark Banner <standard8@mozilla.com>
Wed, 09 Nov 2016 22:06:32 +0000
changeset 370722 239dd56733c4779d60eaadfcbc6569d7ee4a5330
parent 370721 7c2f0afaafd6e6315bda1c9ef9a9b2dbfbb97cad
child 370723 1e328cabfbdf06ada4340b5b89fd6a39ed503b5d
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1322343
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1322343 - Enable no-unused-vars in the local scope in toolkit/.eslintrc.js. r=mossop MozReview-Commit-ID: CiIsUjQzp4D
browser/.eslintrc.js
browser/base/.eslintrc.js
storage/test/unit/test_bug-429521.js
storage/test/unit/test_statement_executeAsync.js
storage/test/unit/test_storage_connection.js
toolkit/.eslintrc.js
toolkit/components/.eslintrc.js
toolkit/content/aboutSupport.js
toolkit/content/aboutTelemetry.js
toolkit/content/aboutwebrtc/aboutWebrtc.js
toolkit/content/browser-content.js
toolkit/content/tests/browser/browser_bug1170531.js
toolkit/content/tests/browser/browser_contentTitle.js
toolkit/content/tests/browser/browser_crash_previous_frameloader.js
toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
toolkit/content/tests/chrome/xul_selectcontrol.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
toolkit/content/tests/mochitest/test_mousecapture.xhtml
toolkit/content/tests/widgets/tree_shared.js
toolkit/content/treeUtils.js
toolkit/content/widgets/browser.xml
toolkit/content/widgets/popup.xml
toolkit/content/widgets/preferences.xml
toolkit/content/widgets/spinner.js
toolkit/content/widgets/tabbox.xml
toolkit/content/widgets/timekeeper.js
toolkit/content/widgets/timepicker.js
toolkit/crashreporter/CrashSubmit.jsm
toolkit/crashreporter/test/unit/test_crashreporter.js
toolkit/crashreporter/test/unit/test_crashreporter_crash_profile_lock.js
toolkit/forgetaboutsite/ForgetAboutSite.jsm
toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
toolkit/identity/IdentityProvider.jsm
toolkit/identity/LogUtils.jsm
toolkit/identity/tests/unit/test_firefox_accounts.js
toolkit/identity/tests/unit/test_jwcrypto.js
toolkit/identity/tests/unit/test_log_utils.js
toolkit/modules/DateTimePickerHelper.jsm
toolkit/modules/Finder.jsm
toolkit/modules/FinderHighlighter.jsm
toolkit/modules/FinderIterator.jsm
toolkit/modules/InlineSpellChecker.jsm
toolkit/modules/NewTabUtils.jsm
toolkit/modules/PageMenu.jsm
toolkit/modules/RemotePageManager.jsm
toolkit/modules/SelectContentHelper.jsm
toolkit/modules/SelectParentHelper.jsm
toolkit/modules/SpatialNavigation.jsm
toolkit/modules/Sqlite.jsm
toolkit/modules/Task.jsm
toolkit/modules/UpdateUtils.jsm
toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
toolkit/modules/tests/browser/browser_RemotePageManager.js
toolkit/modules/tests/xpcshell/test_CanonicalJSON.js
toolkit/modules/tests/xpcshell/test_FileUtils.js
toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
toolkit/modules/tests/xpcshell/test_Log.js
toolkit/modules/tests/xpcshell/test_Promise.js
toolkit/modules/tests/xpcshell/test_session_recorder.js
toolkit/modules/tests/xpcshell/test_sqlite.js
toolkit/modules/tests/xpcshell/test_timer.js
toolkit/mozapps/extensions/test/xpcshell/test_syncGUID.js
toolkit/mozapps/extensions/test/xpcshell/test_webextension_icons.js
toolkit/mozapps/update/nsUpdateService.js
toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
toolkit/profile/content/profileSelection.js
--- a/browser/.eslintrc.js
+++ b/browser/.eslintrc.js
@@ -1,16 +1,11 @@
 "use strict";
 
 module.exports = {
   "extends": [
     "../toolkit/.eslintrc.js"
   ],
 
   "rules": {
-    "no-unused-vars": ["error", {
-      "vars": "local",
-      "varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
-      "args": "none",
-    }],
     "no-shadow": "error"
   }
 };
--- a/browser/base/.eslintrc.js
+++ b/browser/base/.eslintrc.js
@@ -1,11 +1,4 @@
 "use strict";
 
 module.exports = {
-  "rules": {
-    "no-unused-vars": ["error", {
-      "vars": "local",
-      "varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
-      "args": "none",
-    }]
-  }
 };
--- a/storage/test/unit/test_bug-429521.js
+++ b/storage/test/unit/test_bug-429521.js
@@ -19,17 +19,17 @@ function test_bug429521() {
   print("*** test_bug429521: started");
 
   try {
     while (stmt.executeStep()) {
       print("*** test_bug429521: step() Read wrapper.row.zone");
 
       // BUG: the print commands after the following statement
       // are never executed. Script stops immediately.
-      var tzId = stmt.row.zone;
+      stmt.row.zone;
 
       print("*** test_bug429521: step() Read wrapper.row.zone finished");
     }
   } catch (e) {
     print("*** test_bug429521: " + e);
   }
 
   print("*** test_bug429521: finished");
--- a/storage/test/unit/test_statement_executeAsync.js
+++ b/storage/test/unit/test_statement_executeAsync.js
@@ -823,17 +823,17 @@ function test_not_right_owning_statement
     "VALUES (:int)"
   );
   let stmt2 = makeTestStatement(
     "INSERT INTO test (id) " +
     "VALUES (:int)"
   );
 
   let array1 = stmt1.newBindingParamsArray();
-  let array2 = stmt2.newBindingParamsArray();
+  stmt2.newBindingParamsArray();
   let bp = array1.newBindingParams();
   bp.bindByName("int", INTEGER);
   array1.addParams(bp);
 
   // We should not be able to bind array1 since it was created from stmt1.
   expectError(Cr.NS_ERROR_UNEXPECTED,
               () => stmt2.bindParameters(array1));
 
--- a/storage/test/unit/test_storage_connection.js
+++ b/storage/test/unit/test_storage_connection.js
@@ -176,17 +176,17 @@ add_task(function* test_createTable() {
   } finally {
     if (con) {
       con.close();
     }
   }
 });
 
 add_task(function* test_defaultSynchronousAtNormal() {
-  var msc = getOpenedDatabase();
+  getOpenedDatabase();
   var stmt = createStatement("PRAGMA synchronous;");
   try {
     stmt.executeStep();
     do_check_eq(1, stmt.getInt32(0));
   }
   finally {
     stmt.reset();
     stmt.finalize();
--- a/toolkit/.eslintrc.js
+++ b/toolkit/.eslintrc.js
@@ -146,21 +146,21 @@ module.exports = {
 
     // Error on newline where a semicolon is needed
     "no-unexpected-multiline": "error",
 
     // No unreachable statements
     "no-unreachable": "error",
 
     // No declaring variables that are never used
-    // "no-unused-vars": ["error", {
-    //   "vars": "local",
-    //   "varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
-    //   "args": "none",
-    // }],
+    "no-unused-vars": ["error", {
+      "vars": "local",
+      "varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
+      "args": "none",
+    }],
 
     // No using variables before defined
     // "no-use-before-define": ["error", "nofunc"],
 
     // No using with
     "no-with": "error",
 
     // No spacing inside rest or spread expressions
--- a/toolkit/components/.eslintrc.js
+++ b/toolkit/components/.eslintrc.js
@@ -1,11 +1,6 @@
 "use strict";
 
 module.exports = {
   "rules": {
-    "no-unused-vars": ["error", {
-      "vars": "local",
-      "varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
-      "args": "none",
-    }]
   }
 };
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -432,17 +432,17 @@ var snapshotFormatters = {
       }
       addRow(id, "gpuActive", strings.GetStringFromName(active));
       addRows(id, trs);
     }
     showGpu("gpu-1", "");
     showGpu("gpu-2", "2");
 
     // Remove adapter keys.
-    for (let [prop, key] of adapterKeys) {
+    for (let [prop, /* key */] of adapterKeys) {
       delete data[prop];
       delete data[prop + "2"];
     }
     delete data.isGPU2Active;
 
     let featureLog = data.featureLog;
     delete data.featureLog;
 
--- a/toolkit/content/aboutTelemetry.js
+++ b/toolkit/content/aboutTelemetry.js
@@ -409,17 +409,16 @@ var PingPicker = {
     // Update the displayed ping.
     yield this._updateArchivedPingData();
   }),
 
   _renderWeeks: function() {
     let weekSelector = document.getElementById("choose-ping-week");
     removeAllChildNodes(weekSelector);
 
-    let index = 0;
     for (let week of this._weeks) {
       let text = shortDateString(week.startDate)
                  + " - " + shortDateString(yesterday(week.endDate));
 
       let option = document.createElement("option");
       let content = document.createTextNode(text);
       option.appendChild(content);
       weekSelector.appendChild(option);
@@ -623,17 +622,16 @@ var EnvironmentData = {
     let table = document.createElement("table");
     table.setAttribute("id", sectionTitle);
     this.appendAddonSubsectionTitle(sectionTitle, table);
     this.appendRow(table, "persona", addonObj.persona);
     addonSection.appendChild(table);
   },
 
   renderActivePlugins: function(addonObj, addonSection, sectionTitle) {
-    let data = explodeObject(addonObj);
     let table = document.createElement("table");
     table.setAttribute("id", sectionTitle);
     this.appendAddonSubsectionTitle(sectionTitle, table);
 
     for (let plugin of addonObj) {
       let data = explodeObject(plugin);
       this.appendHeadingName(table, data.get("name"));
 
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -267,17 +267,16 @@ AecLogging.prototype.offState = function
   } catch (e) {
     this._message = null;
   }
 };
 
 AecLogging.prototype.onState = function() {
   this._label = getString("aec_logging_on_state_label");
   try {
-    let file = Services.prefs.getCharPref("media.webrtc.debug.aec_log_dir");
     this._message = getString("aec_logging_on_state_msg");
   } catch (e) {
     this._message = null;
   }
 };
 
 AecLogging.prototype.onClick = function() {
   if (WebrtcGlobalInformation.aecDebug) {
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -433,17 +433,16 @@ var Printing = {
       sendAsyncMessage("Printing:Error", {
         isPrinting: wbp.doingPrint,
         nsresult: nsresult,
       });
     }
   },
 
   receiveMessage(message) {
-    let objects = message.objects;
     let data = message.data;
     switch (message.name) {
       case "Printing:Preview:Enter": {
         this.enterPrintPreview(Services.wm.getOuterWindowWithId(data.windowID), data.simplifiedMode);
         break;
       }
 
       case "Printing:Preview:Exit": {
@@ -659,17 +658,16 @@ var Printing = {
   },
 
   exitPrintPreview() {
     docShell.printPreview.exitPrintPreview();
   },
 
   print(contentWindow, simplifiedMode) {
     let printSettings = this.getPrintSettings();
-    let rv = Cr.NS_OK;
 
     // If we happen to be on simplified mode, we need to set docURL in order
     // to generate header/footer content correctly, since simplified tab has
     // "about:blank" as its URI.
     if (printSettings && simplifiedMode) {
       printSettings.docURL = contentWindow.document.baseURI;
     }
 
--- a/toolkit/content/tests/browser/browser_bug1170531.js
+++ b/toolkit/content/tests/browser/browser_bug1170531.js
@@ -1,26 +1,15 @@
 // Test for bug 1170531
 // https://bugzilla.mozilla.org/show_bug.cgi?id=1170531
 
 add_task(function* () {
   // Get a bunch of DOM nodes
-  let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor).
-        getInterface(Ci.nsIDOMWindowUtils);
-
   let editMenu = document.getElementById("edit-menu");
-  let menubar = editMenu.parentNode;
   let menuPopup = editMenu.menupopup;
-  let editMenuIndex = -1;
-  for (let i = 0; i < menubar.children.length; i++) {
-    if (menubar.children[i] === editMenu) {
-      editMenuIndex = i;
-      break;
-    }
-  }
 
   let closeMenu = function(aCallback) {
     if (OS.Constants.Sys.Name == "Darwin") {
       executeSoon(aCallback);
       return;
     }
 
     menuPopup.addEventListener("popuphidden", function onPopupHidden() {
--- a/toolkit/content/tests/browser/browser_contentTitle.js
+++ b/toolkit/content/tests/browser/browser_contentTitle.js
@@ -1,13 +1,12 @@
 var url = "https://example.com/browser/toolkit/content/tests/browser/file_contentTitle.html";
 
 add_task(function*() {
   let tab = gBrowser.selectedTab = gBrowser.addTab(url);
-  let browser = tab.linkedBrowser;
   yield new Promise((resolve) => {
     addEventListener("TestLocationChange", function listener() {
       removeEventListener("TestLocationChange", listener);
       resolve();
     }, true, true);
   });
 
   is(gBrowser.contentTitle, "Test Page", "Should have the right title.");
--- a/toolkit/content/tests/browser/browser_crash_previous_frameloader.js
+++ b/toolkit/content/tests/browser/browser_crash_previous_frameloader.js
@@ -95,17 +95,17 @@ add_task(function* test_crash_in_previou
       setTimeout(() => {
         dump("\nEt tu, Brute?\n");
         dies();
       }, 0);
     });
 
     gBrowser.updateBrowserRemoteness(browser, false);
     info("Waiting for content process to go away.");
-    let [subject, data] = yield contentProcessGone;
+    let [subject /* , data */] = yield contentProcessGone;
 
     // If we don't clean up the minidump, the harness will
     // complain.
     cleanUpMinidump(subject);
 
     info("Content process is gone!");
     Assert.ok(!sawTabCrashed,
               "Should not have seen the oop-browser-crashed event.");
--- a/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
+++ b/toolkit/content/tests/browser/browser_keyevents_during_autoscrolling.js
@@ -7,17 +7,16 @@ add_task(function * ()
   const kKeyDownEvent  = 1;
   const kKeyPressEvent = 2;
   const kKeyUpEvent    = 4;
   const kAllKeyEvents  = 7;
 
   var expectedKeyEvents;
   var dispatchedKeyEvents;
   var key;
-  var root;
 
   /**
    * Encapsulates EventUtils.sendChar().
    */
   function sendChar(aChar)
   {
     key = aChar;
     dispatchedKeyEvents = kNoKeyEvents;
--- a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
+++ b/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
@@ -33,23 +33,23 @@ function runTests()
   var target = document.getElementById("input");
 
   // Register a word to the form history.
   target.focus();
   target.value = "Mozilla";
   synthesizeKey("VK_RETURN", {});
   target.value = "";
 
-  var test1 = new nsDoTestsForAutoCompleteWithComposition(
+  new nsDoTestsForAutoCompleteWithComposition(
     "Testing on HTML input (asynchronously search)",
     window, target, formFillController.controller, is,
     function() { return target.value; },
     function() {
       target.setAttribute("timeout", 0);
-      var test2 = new nsDoTestsForAutoCompleteWithComposition(
+      new nsDoTestsForAutoCompleteWithComposition(
         "Testing on HTML input (synchronously search)",
         window, target, formFillController.controller, is,
         function() { return target.value; },
         function() {
           formFillController.timeout = originalFormFillTimeout;
           SpecialPowers.detachFormFillControllerFrom(window);
           SimpleTest.finish();
         });
--- a/toolkit/content/tests/chrome/xul_selectcontrol.js
+++ b/toolkit/content/tests/chrome/xul_selectcontrol.js
@@ -314,17 +314,17 @@ function test_nsIDOMXULSelectControlElem
   expectedValue = keyWrap ? "first" : "second";
   synthesizeKeyExpectEvent(forwardKey, {}, keyWrap ? element : null, "select", testid + "key down 2");
   test_nsIDOMXULSelectControlElement_States(element, testid + "key down 2", 2,
     expectedItem, expectedIndex, expectedValue);
 
   var thirditem = element.appendItem("Third Item", "third");
   var fourthitem = element.appendItem("Fourth Item", "fourth");
   if (behaviourContains(element.localName, "select-extended-keynav")) {
-    var fifthitem = element.appendItem("Fifth Item", "fifth");
+    element.appendItem("Fifth Item", "fifth");
     var sixthitem = element.appendItem("Sixth Item", "sixth");
 
     synthesizeKeyExpectEvent("VK_END", {}, element, "select", testid + "key end");
     test_nsIDOMXULSelectControlElement_States(element, testid + "key end", 6, sixthitem, 5, "sixth");
 
     synthesizeKeyExpectEvent("VK_HOME", {}, element, "select", testid + "key home");
     test_nsIDOMXULSelectControlElement_States(element, testid + "key home", 6, firstitem, 0, "first");
 
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/BrowserView.js
@@ -170,27 +170,21 @@ function() {
 
   function getNewBatchOperationState() {
     return {
       viewportSizeChanged: false,
       dirtyAll: false
     };
   }
 
-  function clampViewportWH(width, height, visibleRect) {
-    let minW = visibleRect.width;
-    let minH = visibleRect.height;
-    return [Math.max(width, minW), Math.max(height, minH)];
-  }
-
-  function initContainer(container, visibleRect) {
-    container.style.width    = visibleRect.width  + 'px';
-    container.style.height   = visibleRect.height + 'px';
-    container.style.overflow = '-moz-hidden-unscrollable';
-  }
+  // function clampViewportWH(width, height, visibleRect) {
+  //   let minW = visibleRect.width;
+  //   let minH = visibleRect.height;
+  //   return [Math.max(width, minW), Math.max(height, minH)];
+  // }
 
   function resizeContainerToViewport(container, viewportRect) {
     container.style.width  = viewportRect.width  + 'px';
     container.style.height = viewportRect.height + 'px';
   }
 
   // !!! --- RESIZE HACK BEGIN -----
   function simulateMozAfterSizeChange(browser, width, height) {
@@ -252,17 +246,16 @@ function() {
 
     getVisibleRectX: function getVisibleRectX() { return this._visibleRect.x; },
     getVisibleRectY: function getVisibleRectY() { return this._visibleRect.y; },
     getVisibleRectWidth: function getVisibleRectWidth() { return this._visibleRect.width; },
     getVisibleRectHeight: function getVisibleRectHeight() { return this._visibleRect.height; },
 
     setViewportDimensions: function setViewportDimensions(width, height, causedByZoom) {
       let bvs = this._browserViewportState;
-      let vis = this._visibleRect;
 
       if (!bvs)
         return;
 
       // [width, height] = clampViewportWH(width, height, vis);
       bvs.viewportRect.right  = width;
       bvs.viewportRect.bottom = height;
 
@@ -325,19 +318,16 @@ function() {
 
     discardAllBatchOperations: function discardAllBatchOperations() {
       let bops = this._batchOps;
       while (bops.length > 0)
         this.discardBatchOperation();
     },
 
     moveVisibleBy: function moveVisibleBy(dx, dy) {
-      let vr = this._visibleRect;
-      let vs = this._browserViewportState;
-
       this.onBeforeVisibleMove(dx, dy);
       this.onAfterVisibleMove(dx, dy);
     },
 
     moveVisibleTo: function moveVisibleTo(x, y) {
       let visibleRect = this._visibleRect;
       let dx = x - visibleRect.x;
       let dy = y - visibleRect.y;
@@ -686,9 +676,8 @@ BrowserView.BrowserViewportState.prototy
                  '\tvisibleX='     + this.visibleX,
                  '\tvisibleY='     + this.visibleY,
                  '\tzoomLevel='    + this.zoomLevel];
 
     return '[BrowserViewportState] {\n' + props.join(',\n') + '\n}';
   }
 
 };
-
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/FooScript.js
@@ -104,17 +104,16 @@ BrowserView.prototype = {
   },
 
   resizeTileContainer: function resizeTileContainer() {
 
   },
 
   scrollboxToViewportRect: function scrollboxToViewportRect(rect, clip) {
     let leftbar  = this._leftbar.getBoundingClientRect();
-    let rightbar = this._rightbar.getBoundingClientRect();
     let topbar   = this._topbar.getBoundingClientRect();
 
     let xtrans = -leftbar.width;
     let ytrans = -topbar.height;
     let x = rect.x + xtrans;
     let y = rect.y + ytrans;
 
     // XXX we're cheating --- this is not really a clip, but its the only
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/TileManager.js
@@ -171,17 +171,16 @@ TileManager.prototype = {
     if (destCriticalRect) {
 
       let rect = destCriticalRect;
 
       let create = false;
 
       // this._tileCache.forEachIntersectingRect(destCriticalRect, false, appendNonDirtyTile, this);
       let visited = {};
-      let evictGuard = null;
       if (create) {
 	evictGuard = function evictGuard(tile) {
 	  return !visited[tile.toString()];
 	};
       }
 
       let starti = rect.left  >> kTileExponentWidth;
       let endi   = rect.right >> kTileExponentWidth;
@@ -823,18 +822,16 @@ TileManager.Tile.prototype = {
 
     let ctx = this._canvas.getContext("2d");
     ctx.save();
 
     browserView.browserToViewportCanvasContext(ctx);
 
     ctx.translate(x, y);
 
-    let cw = browserView._contentWindow;
-    // let cw = browser.contentWindow;
     ctx.asyncDrawXULElement(browserView._browser,
                    rect.left, rect.top,
                    rect.right - rect.left, rect.bottom - rect.top,
                    "grey",
                    (ctx.DRAWWINDOW_DO_NOT_FLUSH | ctx.DRAWWINDOW_DRAW_CARET));
 
     ctx.restore();
 
--- a/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
+++ b/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
@@ -584,18 +584,16 @@ WidgetStack.prototype = {
       this._viewportBounds.setBounds(arguments[0],
       arguments[1],
       arguments[2],
       arguments[3]);
     } else {
       throw "Invalid number of arguments to setViewportBounds";
     }
 
-    let vp = this._viewport;
-
     let dleft = this._viewportBounds.left - oldBounds.left;
     let dright = this._viewportBounds.right - oldBounds.right;
     let dtop = this._viewportBounds.top - oldBounds.top;
     let dbottom = this._viewportBounds.bottom - oldBounds.bottom;
 
     // log2("setViewportBounds dltrb", dleft, dtop, dright, dbottom);
 
     // move all vp-relative widgets to be the right offset from the bounds again
@@ -622,25 +620,23 @@ WidgetStack.prototype = {
 
     for (let bid in this._barriers) {
       let barrier = this._barriers[bid];
 
       // log2("setViewportBounds: looking at barrier", bid, barrier.vpRelative, barrier.type);
 
       if (barrier.vpRelative) {
         if (barrier.type == "vertical") {
-          let q = "v barrier moving from " + barrier.x + " to ";
           if (barrier.vpOffsetXBefore) {
             barrier.x += dleft;
           } else {
             barrier.x += dright;
           }
           // log2(q += barrier.x);
         } else if (barrier.type == "horizontal") {
-          let q = "h barrier moving from " + barrier.y + " to ";
           if (barrier.vpOffsetYBefore) {
             barrier.y += dtop;
           } else {
             barrier.y += dbottom;
           }
           // log2(q += barrier.y);
         }
       }
@@ -1235,18 +1231,16 @@ WidgetStack.prototype = {
   // If the widget goes to the left or above the viewport widget, then
   // vpOffsetXBefore or vpOffsetYBefore is set.
   // See setViewportBounds for use of vpOffset* state variables, and for how
   // the actual x and y coords of each widget are calculated based on their offsets
   // and the viewport bounds.
   _updateWidgets: function() {
     let vp = this._viewport;
 
-    let ofRect = this._viewingRect.clone();
-
     for (let wid in this._widgetState) {
       let state = this._widgetState[wid];
       if (vp && state.vpRelative) {
         // compute the vpOffset from 0,0 assuming that the viewport rect is 0,0
         if (state.rect.left >= vp.rect.right) {
           state.vpOffsetXBefore = false;
           state.vpOffsetX = state.rect.left - vp.rect.width;
         } else {
@@ -1371,18 +1365,16 @@ WidgetStack.prototype = {
     // t != "tb" && t != "bt" &&
 
     if (t != "horizontal" &&
         t != "vertical")
     {
       throw "Invalid barrier type: " + t;
     }
 
-    let x, y;
-
     let barrier = {};
     let vp = this._viewport;
 
     barrier.type = t;
 
     if (el.getAttribute("left"))
       barrier.x = parseInt(el.getAttribute("left"));
     else if (el.getAttribute("top"))
--- a/toolkit/content/tests/mochitest/test_mousecapture.xhtml
+++ b/toolkit/content/tests/mochitest/test_mousecapture.xhtml
@@ -1,18 +1,18 @@
 <?xml version="1.0"?>
 <!DOCTYPE HTML>
 <html xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <title>Mouse Capture Tests</title>
   <link rel="stylesheet" href="chrome://global/skin/" type="text/css"/>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 
-  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> 
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body id="body" xmlns="http://www.w3.org/1999/xhtml">
   <p id="display"/><div id="content" style="display: none"/><pre id="test"/>
 
 <script><![CDATA[
 
 SimpleTest.expectAssertions(6, 12);
 
@@ -167,19 +167,16 @@ function runTests()
   synthesizeMouse(image, 2, 2, { type: "mouseup" });
 
   window.scroll(0, 0);
 
   // save scroll
   var scrollX = parent ? parent.scrollX : 0;
   var scrollY = parent ? parent.scrollY : 0;
 
-  var b = frames[0].document.getElementById("b");
-//  runCaptureTest(b, selectionCallback);
-
   // restore scroll
   if (parent) parent.scroll(scrollX, scrollY);
 
 //  frames[0].getSelection().collapseToStart();
 
   var body = frames[0].document.body;
   var fixed = frames[0].document.getElementById("fixed");
   function captureOnBody() { body.setCapture() }
@@ -331,9 +328,8 @@ SimpleTest.waitForFocus(runTests);
   <img id="image" xmlns="http://www.w3.org/1999/xhtml"
        onmousedown="this.setCapture();" onmouseup="this.releaseCapture();"
        ondragstart="ok(false, 'should not get a drag when a setCapture is active');"
        src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAAG0lEQVR42mP8z0A%2BYKJA76jmUc2jmkc1U0EzACKcASfOgGoMAAAAAElFTkSuQmCC"/>
 
 </body>
 
 </html>
-
--- a/toolkit/content/tests/widgets/tree_shared.js
+++ b/toolkit/content/tests/widgets/tree_shared.js
@@ -620,17 +620,16 @@ function testtag_tree_TreeSelection_UI(t
 
 function testtag_tree_UI_editing(tree, testid, rowInfo)
 {
   testid += " editing UI ";
 
   // check editing UI
   var ecolumn = tree.columns[0];
   var rowIndex = 2;
-  var inputField = tree.inputField;
 
   // temporary make the tree editable to test mouse double click
   var wasEditable = tree.editable;
   if (!wasEditable)
     tree.editable = true;
 
   // if this is a container save its current open status
   var row = rowInfo.rows[rowIndex];
@@ -918,17 +917,16 @@ function testtag_tree_TreeView_rows(tree
     isEditable: function(row, cell) { return cell.editable },
     isSelectable: function(row, cell) { return cell.selectable },
     getImageSrc: function(row, cell) { return cell.image },
     getProgressMode: function(row, cell) { return cell.mode }
   };
 
   var failedMethods = { };
   var checkMethod, actual, expected;
-  var containerInfo = null;
   var toggleOpenStateOK = true;
 
   for (r = startRow; r < length; r++) {
     var row = rowInfo.rows[r];
     for (var c = 0; c < row.cells.length; c++) {
       var cell = row.cells[c];
 
       for (checkMethod in checkCellMethods) {
--- a/toolkit/content/treeUtils.js
+++ b/toolkit/content/treeUtils.js
@@ -53,26 +53,24 @@ var gTreeUtils = {
 
   sort: function(aTree, aView, aDataSet, aColumn, aComparator,
                  aLastSortColumn, aLastSortAscending)
   {
     var ascending = (aColumn == aLastSortColumn) ? !aLastSortAscending : true;
     if (aDataSet.length == 0)
       return ascending;
 
-    var numericSort = !isNaN(aDataSet[0][aColumn]);
     var sortFunction = null;
     if (aComparator) {
       sortFunction = function(a, b) { return aComparator(a[aColumn], b[aColumn]); };
     }
     aDataSet.sort(sortFunction);
     if (!ascending)
       aDataSet.reverse();
 
     aTree.view.selection.clearSelection();
     aTree.view.selection.select(0);
     aTree.treeBoxObject.invalidate();
     aTree.treeBoxObject.ensureRowIsVisible(0);
 
     return ascending;
   }
 };
-
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -939,17 +939,18 @@
                 }
               }
             }
           }
           catch (e) {
             Components.utils.reportError(e);
           }
           try {
-            var securityUI = this.securityUI;
+            // Ensures the securityUI is initialized.
+            var securityUI = this.securityUI; // eslint-disable-line no-unused-vars
           }
           catch (e) {
           }
 
           // XXX tabbrowser.xml sets "relatedBrowser" as a direct property on
           // some browsers before they are put into a DOM (and get a binding).
           // This hack makes sure that we hold a weak reference to the other
           // browser (and go through the proper getter and setter).
@@ -1564,17 +1565,16 @@
       </handler>
       <handler event="drop" group="system">
       <![CDATA[
         // No need to handle "drop" in e10s, since nsDocShellTreeOwner.cpp in the child process
         // handles that case using "@mozilla.org/content/dropped-link-handler;1" service.
         if (!this.droppedLinkHandler || event.defaultPrevented || this.isRemoteBrowser)
           return;
 
-        let name = { };
         let linkHandler = Components.classes["@mozilla.org/content/dropped-link-handler;1"].
                             getService(Components.interfaces.nsIDroppedLinkHandler);
         try {
           // Pass true to prevent the dropping of javascript:/data: URIs
           var links = linkHandler.dropLinks(event, true);
         } catch (ex) {
           return;
         }
--- a/toolkit/content/widgets/popup.xml
+++ b/toolkit/content/widgets/popup.xml
@@ -396,18 +396,16 @@
         <![CDATA[
           this.popupBoxObject.moveToAnchor(aAnchorElement, aPosition, aX, aY, aAttributesOverride);
         ]]>
         </body>
       </method>
       <method name="adjustArrowPosition">
         <body>
         <![CDATA[
-        var arrow = document.getAnonymousElementByAttribute(this, "anonid", "arrow");
-
         var anchor = this.anchorNode;
         if (!anchor) {
           return;
         }
 
         var container = document.getAnonymousElementByAttribute(this, "anonid", "container");
         var arrowbox = document.getAnonymousElementByAttribute(this, "anonid", "arrowbox");
 
--- a/toolkit/content/widgets/preferences.xml
+++ b/toolkit/content/widgets/preferences.xml
@@ -1063,18 +1063,16 @@
         if (!this._fireEvent("beforeaccept", this)) {
           return false;
         }
 
         var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
                     .getService(Components.interfaces.nsIScriptSecurityManager);
         if (this.type == "child" && window.opener &&
             secMan.isSystemPrincipal(window.opener.document.nodePrincipal)) {
-          let psvc = Components.classes["@mozilla.org/preferences-service;1"]
-                               .getService(Components.interfaces.nsIPrefBranch);
           var pdocEl = window.opener.document.documentElement;
           if (pdocEl.instantApply) {
             let panes = this.preferencePanes;
             for (let i = 0; i < panes.length; ++i)
               panes[i].writePreferences(true);
           }
           else {
             // Clone all the preferences elements from the child document and
--- a/toolkit/content/widgets/spinner.js
+++ b/toolkit/content/widgets/spinner.js
@@ -13,17 +13,16 @@
  */
 
 function Spinner(props, context) {
   this.context = context;
   this._init(props);
 }
 
 {
-  const debug = 0 ? console.log.bind(console, "[spinner]") : function() {};
 
   const ITEM_HEIGHT = 2.5,
         VIEWPORT_SIZE = 7,
         VIEWPORT_COUNT = 5,
         SCROLL_TIMEOUT = 100;
 
   Spinner.prototype = {
     /**
@@ -91,17 +90,16 @@ function Spinner(props, context) {
      *          {Number/String} value: The centered value
      *          {Array} items: The list of items for display
      *          {Boolean} isInfiniteScroll: Whether or not the spinner should
      *            have infinite scroll capability
      *          {Boolean} isValueSet: true if user has selected a value
      *        }
      */
     setState(newState) {
-      const { spinner } = this.elements;
       const { value, items } = this.state;
       const { value: newValue, items: newItems, isValueSet, isInvalid } = newState;
 
       if (this._isArrayDiff(newItems, items)) {
         this.state = Object.assign(this.state, newState);
         this._updateItems();
         this._scrollTo(newValue, true);
       } else if (newValue != value) {
@@ -124,17 +122,17 @@ function Spinner(props, context) {
      * - If a smooth scroll has reached its destination, set [isScrolling] state
      *   to false
      * - If the value has changed, update the [value] state and call [setValue]
      * - If infinite scrolling is on, reset the scrolling position if necessary
      */
     _onScroll() {
       const { items, itemsView, isInfiniteScroll } = this.state;
       const { viewportSize, viewportTopOffset } = this.props;
-      const { spinner, itemsViewElements } = this.elements;
+      const { spinner } = this.elements;
 
       this.state.index = this._getIndexByOffset(spinner.scrollTop);
 
       const value = itemsView[this.state.index + viewportTopOffset].value;
 
       // Check if smooth scrolling has reached its destination.
       // This prevents input box jump when input box changes values.
       if (this.state.value == value && this.state.isScrolling) {
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -26,17 +26,17 @@
         ]]>
         </setter>
         <getter>
         <![CDATA[
           return (this.getAttribute("handleCtrlTab") != "false");
         ]]>
         </getter>
       </property>
-      
+
       <property name="handleCtrlPageUpDown">
         <setter>
         <![CDATA[
           this.setAttribute("handleCtrlPageUpDown", val);
           return val;
         ]]>
         </setter>
         <getter>
@@ -69,17 +69,17 @@
         <getter>
         <![CDATA[
           return this.getElementsByTagNameNS(
               "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
               "tabpanels").item(0);
         ]]>
         </getter>
       </property>
-      
+
       <property name="selectedIndex">
         <getter>
         <![CDATA[
           var tabs = this.tabs;
           return tabs ? tabs.selectedIndex : -1;
         ]]>
         </getter>
 
@@ -239,17 +239,17 @@
       <stylesheet src="chrome://global/skin/tabbox.css"/>
     </resources>
 
     <content>
       <xul:spacer class="tabs-left"/>
       <children/>
       <xul:spacer class="tabs-right" flex="1"/>
     </content>
-    
+
     <implementation implements="nsIDOMXULSelectControlElement, nsIDOMXULRelatedElement">
       <constructor>
       <![CDATA[
         // first and last tabs need to be able to have unique styles
         // and also need to select first tab on startup.
         if (this.firstChild)
           this.firstChild.setAttribute("first-tab", "true");
         if (this.lastChild)
@@ -294,18 +294,16 @@
             return null;
 
           let tabpanelsElm = tabboxElm.tabpanels;
           if (!tabpanelsElm)
             return null;
 
           // Get linked tab panel by 'linkedpanel' attribute on the given tab
           // element.
-          let linkedPanelElm = null;
-
           let linkedPanelId = aTabElm.linkedPanel;
           if (linkedPanelId) {
             let ownerDoc = this.ownerDocument;
 
             // XXX bug 565858: if XUL tab element is anonymous element then
             // suppose linked tab panel is hosted within the same XBL binding
             // and search it by ID attribute inside an anonymous content of
             // the binding. This is not robust assumption since tab elements may
@@ -381,17 +379,17 @@
           const tabs = this.childNodes;
           for (var i = 0; i < tabs.length; i++) {
             if (tabs[i].selected)
               return i;
           }
           return -1;
         ]]>
         </getter>
-        
+
         <setter>
         <![CDATA[
           var tab = this.getItemAtIndex(val);
           if (tab) {
             var alreadySelected = tab.selected;
 
             Array.forEach(this.childNodes, function(aTab) {
               if (aTab.selected && aTab != tab)
@@ -546,17 +544,17 @@
           var tab = document.createElementNS(XULNS, "tab");
           tab.setAttribute("label", label);
           tab.setAttribute("value", value);
           this.appendChild(tab);
           return tab;
         ]]>
         </body>
       </method>
-      
+
       <method name="insertItemAt">
         <parameter name="index"/>
         <parameter name="label"/>
         <parameter name="value"/>
         <body>
         <![CDATA[
           var XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
           var tab = document.createElementNS(XULNS, "tab");
@@ -884,9 +882,8 @@
         var tabs = this.parentNode.childNodes;
         this.parentNode._selectNewTab(tabs[tabs.length - 1], -1);
       ]]>
       </handler>
     </handlers>
   </binding>
 
 </bindings>
-
--- a/toolkit/content/widgets/timekeeper.js
+++ b/toolkit/content/widgets/timekeeper.js
@@ -19,18 +19,16 @@
  *        }
  */
 function TimeKeeper(props) {
   this.props = props;
   this.state = { time: new Date(0), ranges: {} };
 }
 
 {
-  const debug = 0 ? console.log.bind(console, '[timekeeper]') : function() {};
-
   const DAY_PERIOD_IN_HOURS = 12,
         SECOND_IN_MS = 1000,
         MINUTE_IN_MS = 60000,
         HOUR_IN_MS = 3600000,
         DAY_PERIOD_IN_MS = 43200000,
         DAY_IN_MS = 86400000,
         TIME_FORMAT_24 = "24";
 
--- a/toolkit/content/widgets/timepicker.js
+++ b/toolkit/content/widgets/timepicker.js
@@ -5,18 +5,16 @@
 "use strict";
 
 function TimePicker(context) {
   this.context = context;
   this._attachEventListeners();
 }
 
 {
-  const debug = 0 ? console.log.bind(console, "[timepicker]") : function() {};
-
   const DAY_PERIOD_IN_HOURS = 12,
         SECOND_IN_MS = 1000,
         MINUTE_IN_MS = 60000,
         DAY_IN_MS = 86400000;
 
   TimePicker.prototype = {
     /**
      * Initializes the time picker. Set the default states and properties.
@@ -73,17 +71,17 @@ function TimePicker(context) {
       let time = new Date("1970-01-01T" + timeString + "Z");
       return time.toString() == "Invalid Date" ? false : time;
     },
 
     /**
      * Initalize the spinner components.
      */
     _createComponents() {
-      const { locale, step, format } = this.props;
+      const { locale, format } = this.props;
       const { timeKeeper } = this.state;
 
       const wrapSetValueFn = (setTimeFunction) => {
         return (value) => {
           setTimeFunction(value);
           this._setComponentStates();
           this._dispatchState();
         };
--- a/toolkit/crashreporter/CrashSubmit.jsm
+++ b/toolkit/crashreporter/CrashSubmit.jsm
@@ -396,17 +396,17 @@ Submitter.prototype = {
         this.extraKeyVals[key] = extraKeyVals[key];
       }
     }
 
     let additionalDumps = [];
     if ("additional_minidumps" in this.extraKeyVals) {
       let names = this.extraKeyVals.additional_minidumps.split(',');
       for (let name of names) {
-        let [dump, extra, memory] = getPendingMinidump(this.id + "-" + name);
+        let [dump /* , extra, memory */] = getPendingMinidump(this.id + "-" + name);
         if (!dump.exists()) {
           this.notifyStatus(FAILED);
           this.cleanup();
           return this.deferredSubmit.promise;
         }
         additionalDumps.push({'name': name, 'dump': dump});
       }
     }
@@ -449,18 +449,16 @@ this.CrashSubmit = {
    *
    *  @return a Promise that is fulfilled with the server crash ID when the
    *          submission succeeds and rejected otherwise.
    */
   submit: function CrashSubmit_submit(id, params)
   {
     params = params || {};
     let recordSubmission = false;
-    let submitSuccess = null;
-    let submitError = null;
     let noThrottle = false;
     let extraExtraKeyVals = null;
 
     if ('recordSubmission' in params)
       recordSubmission = params.recordSubmission;
     if ('noThrottle' in params)
       noThrottle = params.noThrottle;
     if ('extraExtraKeyVals' in params)
@@ -491,17 +489,17 @@ this.CrashSubmit = {
    * Add a .dmg.ignore file along side the .dmp file to indicate that the user
    * shouldn't be prompted to submit this crash report again.
    *
    * @param id
    *        Filename (minus .dmp extension) of the report to ignore
    */
 
   ignore: function CrashSubmit_ignore(id) {
-    let [dump, extra, mem] = getPendingMinidump(id);
+    let [dump /* , extra, memory */] = getPendingMinidump(id);
     return OS.File.open(dump.path + ".ignore", {create: true},
                         {unixFlags: OS.Constants.libc.O_CREAT})
       .then((file) => { file.close(); });
   },
 
   /**
    * Get the list of pending crash IDs.
    *
--- a/toolkit/crashreporter/test/unit/test_crashreporter.js
+++ b/toolkit/crashreporter/test/unit/test_crashreporter.js
@@ -3,17 +3,17 @@ function run_test()
   dump("INFO | test_crashreporter.js | Get crashreporter service.\n");
   var cr = Components.classes["@mozilla.org/toolkit/crash-reporter;1"]
                      .getService(Components.interfaces.nsICrashReporter);
   do_check_neq(cr, null);
 
   do_check_true(cr.enabled);
 
   try {
-    let su = cr.serverURL;
+    cr.serverURL;
     do_throw("Getting serverURL when not set should have thrown!");
   }
   catch (ex) {
     do_check_eq(ex.result, Components.results.NS_ERROR_FAILURE);
   }
 
   // check setting/getting serverURL
   var ios = Components.classes["@mozilla.org/network/io-service;1"]
--- a/toolkit/crashreporter/test/unit/test_crashreporter_crash_profile_lock.js
+++ b/toolkit/crashreporter/test/unit/test_crashreporter_crash_profile_lock.js
@@ -11,16 +11,16 @@ function run_test()
   do_crash(function() {
              let env = Components.classes["@mozilla.org/process/environment;1"]
                .getService(Components.interfaces.nsIEnvironment);
              // the python harness sets this in the environment for us
              let profd = env.get("XPCSHELL_TEST_PROFILE_DIR");
              let dir = Components.classes["@mozilla.org/file/local;1"]
                .createInstance(Components.interfaces.nsILocalFile);
              dir.initWithPath(profd);
-             let lock = CrashTestUtils.lockDir(dir);
+             CrashTestUtils.lockDir(dir);
              // when we crash, the lock file should be cleaned up
            },
            function(mdump, extra) {
              // if we got here, we have a minidump, so that's all we wanted
              do_check_true(true);
            });
 }
--- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm
+++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm
@@ -88,17 +88,16 @@ this.ForgetAboutSite = {
     // Plugin data
     const phInterface = Ci.nsIPluginHost;
     const FLAG_CLEAR_ALL = phInterface.FLAG_CLEAR_ALL;
     let ph = Cc["@mozilla.org/plugin/host;1"].getService(phInterface);
     let tags = ph.getPluginTags();
     let promises = [];
     for (let i = 0; i < tags.length; i++) {
       let promise = new Promise(resolve => {
-        let tag = tags[i];
         try {
           ph.clearSiteData(tags[i], aDomain, FLAG_CLEAR_ALL, -1, function(rv) {
             resolve();
           });
         } catch (e) {
           // Ignore errors from the plugin, but resolve the promise
           resolve();
         }
--- a/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
+++ b/toolkit/forgetaboutsite/test/unit/test_removeDataFromDomain.js
@@ -484,17 +484,17 @@ function* test_push_cleared()
            getService(Ci.nsIPushService);
   } catch (e) {
     // No push service, skip test.
     return;
   }
 
   do_get_profile();
   setPrefs();
-  const {PushDB, PushService, PushServiceWebSocket} = serviceExports;
+  const {PushService, PushServiceWebSocket} = serviceExports;
   const userAgentID = 'bd744428-f125-436a-b6d0-dd0c9845837f';
   const channelID = '0ef2ad4a-6c49-41ad-af6e-95d2425276bf';
 
   let db = PushServiceWebSocket.newPushDB();
 
   try {
     PushService.init({
       serverURI: "wss://push.example.org/",
--- a/toolkit/identity/IdentityProvider.jsm
+++ b/toolkit/identity/IdentityProvider.jsm
@@ -173,17 +173,16 @@ IdentityProviderService.prototype = {
 
     // Expect a flow for this caller already to be underway.
     let provFlow = this.getProvisionFlow(aCaller.id, aCaller.doError);
 
     // keep the caller object around
     provFlow.caller = aCaller;
 
     let identity = provFlow.identity;
-    let frame = provFlow.provisioningFrame;
 
     // Determine recommended length of cert.
     let duration = this.certDuration;
 
     // Make a record that we have begun provisioning.  This is required
     // for genKeyPair.
     provFlow.didBeginProvisioning = true;
 
--- a/toolkit/identity/LogUtils.jsm
+++ b/toolkit/identity/LogUtils.jsm
@@ -82,18 +82,16 @@ IdentityLogger.prototype = {
     Services.console.logStringMessage(output);
   },
 
   /**
    * reportError() - report an error through component utils as well as
    * our log function
    */
   reportError: function reportError(aPrefix, ...aArgs) {
-    let prefix = aPrefix + ' ERROR';
-
     // Report the error in the browser
     let output = this._generateLogMessage(aPrefix, aArgs);
     Cu.reportError(output);
     dump("ERROR: " + output + "\n");
     for (let frame = Components.stack.caller; frame; frame = frame.caller) {
       dump(frame + "\n");
     }
   }
--- a/toolkit/identity/tests/unit/test_firefox_accounts.js
+++ b/toolkit/identity/tests/unit/test_firefox_accounts.js
@@ -175,18 +175,16 @@ function test_logout() {
   withSomebodySignedIn().then(() => {
     FirefoxAccounts.RP.watch(mockedRP);
   });
 }
 
 function test_error() {
   do_test_pending();
 
-  let received = [];
-
   // Mock the fxAccountsManager so that getAssertion rejects its promise and
   // triggers our onerror handler.  (This is the method that's used internally
   // by FirefoxAccounts.RP.request().)
   let originalGetAssertion = FirefoxAccounts.fxAccountsManager.getAssertion;
   FirefoxAccounts.fxAccountsManager.getAssertion = function(audience) {
     return Promise.reject(new Error("barf!"));
   };
 
--- a/toolkit/identity/tests/unit/test_jwcrypto.js
+++ b/toolkit/identity/tests/unit/test_jwcrypto.js
@@ -210,17 +210,17 @@ function test_audience_encoding_bug97258
   jwcrypto.generateKeyPair(
     "DS160",
     function(err, kp) {
       do_check_null(err);
       jwcrypto.generateAssertion("fake-cert", kp, audience,
         function(err2, backedAssertion) {
           do_check_null(err2);
 
-          let [cert, assertion] = backedAssertion.split("~");
+          let [/* cert */, assertion] = backedAssertion.split("~");
           let components = extractComponents(assertion);
           do_check_eq(components.payload.aud, audience);
 
           do_test_finished();
           run_next_test();
         }
       );
     }
--- a/toolkit/identity/tests/unit/test_log_utils.js
+++ b/toolkit/identity/tests/unit/test_log_utils.js
@@ -23,17 +23,17 @@ function toggle_debug() {
       }
     },
 
     init: function() {
       Services.prefs.addObserver('toolkit.identity.debug', this, false);
     }
   };
 
-  var wrapper = new Wrapper();
+  new Wrapper();
   Services.prefs.setBoolPref('toolkit.identity.debug', true);
 }
 
 // test that things don't break
 
 function logAlias(...args) {
   Logger.log.apply(Logger, ["log alias"].concat(args));
 }
--- a/toolkit/modules/DateTimePickerHelper.jsm
+++ b/toolkit/modules/DateTimePickerHelper.jsm
@@ -105,17 +105,16 @@ this.DateTimePickerHelper = {
       browser.messageManager.sendAsyncMessage(
         "FormDateTime:PickerValueChanged", { hour, minute });
     }
   },
 
   // Get picker from browser and show it anchored to the input box.
   showPicker: function(aBrowser, aData) {
     let rect = aData.rect;
-    let dir = aData.dir;
     let type = aData.type;
     let detail = aData.detail;
 
     this._anchor = aBrowser.ownerGlobal.gBrowser.popupAnchor;
     this._anchor.left = rect.left;
     this._anchor.top = rect.top;
     this._anchor.width = rect.width;
     this._anchor.height = rect.height;
--- a/toolkit/modules/Finder.jsm
+++ b/toolkit/modules/Finder.jsm
@@ -412,17 +412,16 @@ Finder.prototype = {
         this.searchString == "" || !aWord || !this.matchesCountLimit) {
       this._notifyMatchesCount({
         total: 0,
         current: 0
       });
       return;
     }
 
-    let window = this._getWindow();
     this._currentFoundRange = this._fastFind.getFoundRange();
 
     let params = {
       caseSensitive: this._fastFind.caseSensitive,
       entireWord: this._fastFind.entireWord,
       linksOnly: aLinksOnly,
       word: aWord
     };
--- a/toolkit/modules/FinderHighlighter.jsm
+++ b/toolkit/modules/FinderHighlighter.jsm
@@ -1490,18 +1490,16 @@ FinderHighlighter.prototype = {
   },
 
   WillDeleteSelection(selection) {
     let editor = this._getEditableNode(selection.getRangeAt(0)
                                                  .startContainer).editor;
     let controller = editor.selectionController;
     let fSelection = controller.getSelection(Ci.nsISelectionController.SELECTION_FIND);
 
-    let selectionIndex = 0;
-    let findSelectionIndex = 0;
     let shouldDelete = {};
     let numberOfDeletedSelections = 0;
     let numberOfMatches = fSelection.rangeCount;
 
     // We need to test if any ranges in the deleted selection (selection)
     // are in any of the ranges of the find selection
     // Usually both selections will only contain one range, however
     // either may contain more than one.
--- a/toolkit/modules/FinderIterator.jsm
+++ b/toolkit/modules/FinderIterator.jsm
@@ -448,17 +448,17 @@ this.FinderIterator = {
       // During the timeout, we could have gotten the signal to stop iterating.
       // Make sure we do here.
       if (!this.running || spawnId !== this._spawnId)
         return;
     }
 
     this._notifyListeners("start", this.params);
 
-    let { linksOnly, window, word } = this._currentParams;
+    let { linksOnly, window } = this._currentParams;
     // First we collect all frames we need to search through, whilst making sure
     // that the parent window gets dibs.
     let frames = [window].concat(this._collectFrames(window, finder));
     let iterCount = 0;
     for (let frame of frames) {
       for (let range of this._iterateDocument(this._currentParams, frame)) {
         // Between iterations, for example after a sleep of one cycle, we could
         // have gotten the signal to stop iterating. Make sure we do here.
--- a/toolkit/modules/InlineSpellChecker.jsm
+++ b/toolkit/modules/InlineSpellChecker.jsm
@@ -214,17 +214,16 @@ InlineSpellChecker.prototype = {
       list = this.mRemote.dictionaryList;
       curlang = this.mRemote.currentDictionary;
     }
     else if (this.mInlineSpellChecker) {
       var spellchecker = this.mInlineSpellChecker.spellChecker;
       var o1 = {}, o2 = {};
       spellchecker.GetDictionaryList(o1, o2);
       list = o1.value;
-      var listcount = o2.value;
       try {
         curlang = spellchecker.GetCurrentDictionary();
       } catch (e) {}
     }
 
     var sortedList = this.sortDictionaryList(list);
 
     for (var i = 0; i < sortedList.length; i++) {
@@ -258,17 +257,17 @@ InlineSpellChecker.prototype = {
     return list.length;
   },
 
   // Formats a valid BCP 47 language tag based on available localized names.
   getDictionaryDisplayName: function(dictionaryName) {
     try {
       // Get the display name for this dictionary.
       let languageTagMatch = /^([a-z]{2,3}|[a-z]{4}|[a-z]{5,8})(?:[-_]([a-z]{4}))?(?:[-_]([A-Z]{2}|[0-9]{3}))?((?:[-_](?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*)(?:[-_][a-wy-z0-9](?:[-_][a-z0-9]{2,8})+)*(?:[-_]x(?:[-_][a-z0-9]{1,8})+)?$/i;
-      var [languageTag, languageSubtag, scriptSubtag, regionSubtag, variantSubtags] = dictionaryName.match(languageTagMatch);
+      var [/* languageTag */, languageSubtag, scriptSubtag, regionSubtag, variantSubtags] = dictionaryName.match(languageTagMatch);
     } catch (e) {
       // If we weren't given a valid language tag, just use the raw dictionary name.
       return dictionaryName;
     }
 
     if (!gLanguageBundle) {
       // Create the bundles for language and region names.
       var bundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
--- a/toolkit/modules/NewTabUtils.jsm
+++ b/toolkit/modules/NewTabUtils.jsm
@@ -904,17 +904,17 @@ var Links = {
           } catch (e) {
             // We want to proceed even if a callback fails.
           }
         }
       }
     }
 
     let numProvidersRemaining = this._providers.size;
-    for (let [provider, links] of this._providers) {
+    for (let [provider /* , links */] of this._providers) {
       this._populateProviderCache(provider, () => {
         if (--numProvidersRemaining == 0)
           executeCallbacks();
       }, aForce);
     }
 
     this._addObserver();
   },
@@ -1017,17 +1017,17 @@ var Links = {
     * to increment or decrement it. We do this by iterating over all stored providers
     * to find which provider this link already exists in. For providers that
     * have this link, we will adjust siteMap for them accordingly.
     *
     * @param aLink The link that will affect siteMap
     * @param increment A boolean for whether to increment or decrement siteMap
     */
   _adjustSiteMapAndNotify: function(aLink, increment = true) {
-    for (let [provider, cache] of this._providers) {
+    for (let [/* provider */, cache] of this._providers) {
       // We only update siteMap if aLink is already stored in linkMap.
       if (cache.linkMap.get(aLink.url)) {
         if (increment) {
           this._incrementSiteMap(cache.siteMap, aLink);
           continue;
         }
         this._decrementSiteMap(cache.siteMap, aLink);
       }
--- a/toolkit/modules/PageMenu.jsm
+++ b/toolkit/modules/PageMenu.jsm
@@ -16,17 +16,16 @@ PageMenu.prototype = {
   _popup: null,
 
   // Only one of builder or browser will end up getting set.
   _builder: null,
   _browser: null,
 
   // Given a target node, get the context menu for it or its ancestor.
   getContextMenu: function(aTarget) {
-    let pageMenu = null;
     let target = aTarget;
     while (target) {
       let contextMenu = target.contextMenu;
       if (contextMenu) {
         return contextMenu;
       }
       target = target.parentNode;
     }
--- a/toolkit/modules/RemotePageManager.jsm
+++ b/toolkit/modules/RemotePageManager.jsm
@@ -509,17 +509,17 @@ var observer = (window) => {
 
   // Get the frame message manager for this window so we can associate this
   // page with a browser element
   let messageManager = window.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDocShell)
                              .QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIContentFrameMessageManager);
   // Set up the child side of the message port
-  let port = new ChildMessagePort(messageManager, window);
+  new ChildMessagePort(messageManager, window);
 };
 Services.obs.addObserver(observer, "chrome-document-global-created", false);
 Services.obs.addObserver(observer, "content-document-global-created", false);
 
 // A message from chrome telling us what pages to listen for
 Services.cpmm.addMessageListener("RemotePage:Register", ({ data }) => {
   for (let url of data.urls)
     registeredURLs.add(url);
--- a/toolkit/modules/SelectContentHelper.jsm
+++ b/toolkit/modules/SelectContentHelper.jsm
@@ -202,18 +202,16 @@ this.SelectContentHelper.prototype = {
 
 function getComputedStyles(element) {
   return element.ownerDocument.defaultView.getComputedStyle(element);
 }
 
 function buildOptionListForChildren(node) {
   let result = [];
 
-  let win = node.ownerDocument.defaultView;
-
   for (let child of node.children) {
     let tagName = child.tagName.toUpperCase();
 
     if (tagName == 'OPTION' || tagName == 'OPTGROUP') {
       if (child.hidden) {
         continue;
       }
 
--- a/toolkit/modules/SelectParentHelper.jsm
+++ b/toolkit/modules/SelectParentHelper.jsm
@@ -139,18 +139,16 @@ this.SelectParentHelper = {
       case "keydown":
         if (event.keyCode == event.DOM_VK_RETURN) {
           closedWithEnter = true;
         }
         break;
 
       case "command":
         if (event.target.hasAttribute("value")) {
-          let win = currentBrowser.ownerDocument.defaultView;
-
           currentBrowser.messageManager.sendAsyncMessage("Forms:SelectDropDownItem", {
             value: event.target.value,
             closedWithEnter: closedWithEnter
           });
         }
         break;
 
       case "fullscreen":
--- a/toolkit/modules/SpatialNavigation.jsm
+++ b/toolkit/modules/SpatialNavigation.jsm
@@ -244,17 +244,16 @@ function _getRootBounds(windowUtils) {
   return cssPageRectCopy;
 }
 
 // Returns the best node to focus from the list of nodes returned by the hit
 // test.
 function _getBestToFocus(nodes, key, currentlyFocused) {
   let best = null;
   let bestDist;
-  let bestMid;
   let nodeMid;
   let currentlyFocusedMid = _getMidpoint(currentlyFocused);
   let currentlyFocusedRect = currentlyFocused.getBoundingClientRect();
 
   for (let i = 0; i < nodes.length; i++) {
     // Reject the currentlyFocused, and all node types we can't focus
     if (!_canFocus(nodes[i]) || nodes[i] === currentlyFocused) {
       continue;
--- a/toolkit/modules/Sqlite.jsm
+++ b/toolkit/modules/Sqlite.jsm
@@ -422,31 +422,31 @@ ConnectionData.prototype = Object.freeze
     return cloneStorageConnection(options);
   },
   _getOperationId: function() {
     return this._operationsCounter++;
   },
   _finalize: function() {
     this._log.debug("Finalizing connection.");
     // Cancel any pending statements.
-    for (let [k, statement] of this._pendingStatements) {
+    for (let [/* k */, statement] of this._pendingStatements) {
       statement.cancel();
     }
     this._pendingStatements.clear();
 
     // We no longer need to track these.
     this._statementCounter = 0;
 
     // Next we finalize all active statements.
-    for (let [k, statement] of this._anonymousStatements) {
+    for (let [/* k */, statement] of this._anonymousStatements) {
       statement.finalize();
     }
     this._anonymousStatements.clear();
 
-    for (let [k, statement] of this._cachedStatements) {
+    for (let [/* k */, statement] of this._cachedStatements) {
       statement.finalize();
     }
     this._cachedStatements.clear();
 
     // This guards against operations performed between the call to this
     // function and asyncClose() finishing. See also bug 726990.
     this._open = false;
 
@@ -656,17 +656,17 @@ ConnectionData.prototype = Object.freeze
   shrinkMemory: function() {
     this._log.info("Shrinking memory usage.");
     let onShrunk = this._clearIdleShrinkTimer.bind(this);
     return this.execute("PRAGMA shrink_memory").then(onShrunk, onShrunk);
   },
 
   discardCachedStatements: function() {
     let count = 0;
-    for (let [k, statement] of this._cachedStatements) {
+    for (let [/* k */, statement] of this._cachedStatements) {
       ++count;
       statement.finalize();
     }
     this._cachedStatements.clear();
     this._log.debug("Discarded " + count + " cached statements.");
     return count;
   },
 
@@ -1165,17 +1165,16 @@ OpenedConnection.prototype = Object.free
   /**
    * The integer schema version of the database.
    *
    * This is 0 if not schema version has been set.
    *
    * @return Promise<int>
    */
   getSchemaVersion: function() {
-    let self = this;
     return this.execute("PRAGMA user_version").then(
       function onSuccess(result) {
         if (result == null) {
           return 0;
         }
         return JSON.stringify(result[0].getInt32(0));
       }
     );
--- a/toolkit/modules/Task.jsm
+++ b/toolkit/modules/Task.jsm
@@ -418,17 +418,16 @@ TaskImpl.prototype = {
 
       if (gMaintainStack &&
           aException._capturedTaskStack != this._stack &&
           typeof stack == "string") {
 
         // Rewrite the stack for more readability.
 
         let bottomStack = this._stack;
-        let topStack = stack;
 
         stack = Task.Debugging.generateReadableStack(stack);
 
         aException.stack = stack;
 
         // If aException is reinjected in the same task and rethrown,
         // we don't want to perform the rewrite again.
         aException._capturedTaskStack = bottomStack;
--- a/toolkit/modules/UpdateUtils.jsm
+++ b/toolkit/modules/UpdateUtils.jsm
@@ -319,33 +319,16 @@ XPCOMUtils.defineLazyGetter(UpdateUtils,
           {szCSDVersion: ctypes.ArrayType(WCHAR, SZCSDVERSIONLENGTH)},
           {wServicePackMajor: WORD},
           {wServicePackMinor: WORD},
           {wSuiteMask: WORD},
           {wProductType: BYTE},
           {wReserved: BYTE}
           ]);
 
-      // This structure is described at:
-      // http://msdn.microsoft.com/en-us/library/ms724958%28v=vs.85%29.aspx
-      const SYSTEM_INFO = new ctypes.StructType('SYSTEM_INFO',
-          [
-          {wProcessorArchitecture: WORD},
-          {wReserved: WORD},
-          {dwPageSize: DWORD},
-          {lpMinimumApplicationAddress: ctypes.voidptr_t},
-          {lpMaximumApplicationAddress: ctypes.voidptr_t},
-          {dwActiveProcessorMask: DWORD.ptr},
-          {dwNumberOfProcessors: DWORD},
-          {dwProcessorType: DWORD},
-          {dwAllocationGranularity: DWORD},
-          {wProcessorLevel: WORD},
-          {wProcessorRevision: WORD}
-          ]);
-
       let kernel32 = false;
       try {
         kernel32 = ctypes.open("Kernel32");
       } catch (e) {
         Cu.reportError("Unable to open kernel32! " + e);
         osVersion += ".unknown (unknown)";
       }
 
--- a/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
+++ b/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm
@@ -164,17 +164,17 @@ var SimpleServiceDiscovery = {
     this._searchTimeout.initWithCallback(this._searchShutdown.bind(this), SSDP_DISCOVER_TIMEOUT, Ci.nsITimer.TYPE_ONE_SHOT);
 
     let data = SSDP_DISCOVER_PACKET;
 
     // Send discovery packets out at 1 per SSDP_TRANSMISSION_INTERVAL and send each SSDP_DISCOVER_ATTEMPTS times
     // to allow for packet loss on noisy networks.
     let timeout = SSDP_DISCOVER_DELAY;
     for (let attempts = 0; attempts < SSDP_DISCOVER_ATTEMPTS; attempts++) {
-      for (let [key, device] of this._devices) {
+      for (let [/* key */, device] of this._devices) {
         let target = device.target;
         setTimeout(function() {
           let msgData = data.replace("%SEARCH_TARGET%", target);
           try {
             let msgRaw = converter.convertToByteArray(msgData);
             socket.send(SSDP_ADDRESS, SSDP_PORT, msgRaw, msgRaw.length);
           } catch (e) {
             log("failed to convert to byte array: " + e);
@@ -219,17 +219,17 @@ var SimpleServiceDiscovery = {
   // Called when the search timeout is hit. We use it to cleanup the socket and
   // perform some post-processing on the services list.
   _searchShutdown: function _searchShutdown() {
     if (this._searchSocket) {
       // This will call onStopListening.
       this._searchSocket.close();
 
       // Clean out any stale services
-      for (let [key, service] of this._services) {
+      for (let [/* key */, service] of this._services) {
         if (service.lastPing != this._searchTimestamp) {
           this.removeService(service.uuid);
         }
       }
     }
 
     this._stopExternalDiscovery();
   },
@@ -300,29 +300,29 @@ var SimpleServiceDiscovery = {
       return this._services.get(aUUID);
     }
     return null;
   },
 
   // Returns an array copy of the active services
   get services() {
     let array = [];
-    for (let [key, service] of this._services) {
+    for (let [/* key */, service] of this._services) {
       let target = this._devices.get(service.deviceID);
       service.extensions = target.extensions;
       service.types = target.types;
       array.push(service);
     }
     return array;
   },
 
   // Returns false if the service does not match the device's filters
   _filterService: function _filterService(aService) {
     // Loop over all the devices, looking for one that matches the service
-    for (let [key, device] of this._devices) {
+    for (let [/* key */, device] of this._devices) {
       // First level of match is on the target itself
       if (device.target != aService.target) {
         continue;
       }
 
       // If we have no filter, everything passes
       if (!("filters" in device)) {
         aService.deviceID = device.id;
--- a/toolkit/modules/tests/browser/browser_RemotePageManager.js
+++ b/toolkit/modules/tests/browser/browser_RemotePageManager.js
@@ -95,17 +95,17 @@ add_task(function* init_navigate() {
   }
 
   yield loaded;
 
   gBrowser.goBack();
   port = yield waitForPort(TEST_URL, false);
 
   port.sendAsyncMessage("Ping2");
-  let message = yield waitForMessage(port, "Pong2");
+  yield waitForMessage(port, "Pong2");
   port.destroy();
 
   gBrowser.removeCurrentTab();
 });
 
 // Test that opening a page creates a port, sends the load event and then
 // closing the tab sends the unload event
 add_task(function* init_close() {
--- a/toolkit/modules/tests/xpcshell/test_CanonicalJSON.js
+++ b/toolkit/modules/tests/xpcshell/test_CanonicalJSON.js
@@ -64,17 +64,16 @@ add_task(function* test_canonicalJSON_do
 });
 
 
 add_task(function* test_canonicalJSON_preserves_data() {
   const records = [
     {'foo': 'bar', 'last_modified': '12345', 'id': '1'},
     {'bar': 'baz', 'last_modified': '45678', 'id': '2'},
   ]
-  const serialized = CanonicalJSON.stringify(records);
   const expected = '[{"foo":"bar","id":"1","last_modified":"12345"},' +
                    '{"bar":"baz","id":"2","last_modified":"45678"}]';
   do_check_eq(CanonicalJSON.stringify(records), expected);
 });
 
 add_task(function* test_canonicalJSON_does_not_add_space_separators() {
   const records = [
     {'foo': 'bar', 'last_modified': '12345', 'id': '1'},
--- a/toolkit/modules/tests/xpcshell/test_FileUtils.js
+++ b/toolkit/modules/tests/xpcshell/test_FileUtils.js
@@ -28,17 +28,17 @@ add_test(function test_getFile() {
   other.append("foobar");
   do_check_true(file.equals(other));
 
   run_next_test();
 });
 
 add_test(function test_getFile_nonexistentDir() {
   do_check_throws(function() {
-    let file = FileUtils.getFile("NonexistentD", ["foobar"]);
+    FileUtils.getFile("NonexistentD", ["foobar"]);
   }, Components.results.NS_ERROR_FAILURE);
 
   run_next_test();
 });
 
 add_test(function test_getFile_createDirs() {
   let file = FileUtils.getFile("ProfD", ["a", "b", "foobar"]);
   do_check_true(file instanceof Components.interfaces.nsIFile);
@@ -64,17 +64,17 @@ add_test(function test_getDir() {
   other.append("foodir");
   do_check_true(dir.equals(other));
 
   run_next_test();
 });
 
 add_test(function test_getDir_nonexistentDir() {
   do_check_throws(function() {
-    let file = FileUtils.getDir("NonexistentD", ["foodir"]);
+    FileUtils.getDir("NonexistentD", ["foodir"]);
   }, Components.results.NS_ERROR_FAILURE);
 
   run_next_test();
 });
 
 add_test(function test_getDir_shouldCreate() {
   let dir = FileUtils.getDir("ProfD", ["c", "d", "foodir"], true);
   do_check_true(dir instanceof Components.interfaces.nsIFile);
--- a/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
+++ b/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js
@@ -544,23 +544,19 @@ add_task(function* test_simpleCheckAndIn
   let result = yield installManager.simpleCheckAndInstall();
   do_check_eq(result.status, "too-frequent-no-check");
 });
 
 /**
  * Tests that installing addons when there is no server works as expected
  */
 add_test(function test_installAddon_noServer() {
-  let dir = FileUtils.getDir("TmpD", [], true);
   let zipFileName = "test_GMP.zip";
   let zipURL = URL_HOST + ":0/" + zipFileName;
 
-  let data = "e~=0.5772156649";
-  let zipFile = createNewZipFile(zipFileName, data);
-
   let responseXML =
     "<?xml version=\"1.0\"?>" +
     "<updates>" +
     "    <addons>" +
     "        <addon id=\"gmp-gmpopenh264\"" +
     "               URL=\"" + zipURL + "\"" +
     "               hashFunction=\"sha256\"" +
     "               hashValue=\"11221cbda000347b054028b527a60e578f919cb10f322ef8077d3491c6fcb474\"" +
--- a/toolkit/modules/tests/xpcshell/test_Log.js
+++ b/toolkit/modules/tests/xpcshell/test_Log.js
@@ -52,17 +52,17 @@ add_task(function test_Logger() {
 });
 
 add_task(function test_Logger_parent() {
   // Check whether parenting is correct
   let grandparentLog = Log.repository.getLogger("grandparent");
   let childLog = Log.repository.getLogger("grandparent.parent.child");
   do_check_eq(childLog.parent.name, "grandparent");
 
-  let parentLog = Log.repository.getLogger("grandparent.parent");
+  Log.repository.getLogger("grandparent.parent");
   do_check_eq(childLog.parent.name, "grandparent.parent");
 
   // Check that appends are exactly in scope
   let gpAppender = new MockAppender(new Log.BasicFormatter());
   gpAppender.level = Log.Level.Info;
   grandparentLog.addAppender(gpAppender);
   childLog.info("child info test");
   Log.repository.rootLogger.info("this shouldn't show up in gpAppender");
--- a/toolkit/modules/tests/xpcshell/test_Promise.js
+++ b/toolkit/modules/tests/xpcshell/test_Promise.js
@@ -282,17 +282,17 @@ tests.push(
     let exception_content = new Error("Boom!");
 
     let observer_1 = source.promise.then(
       function onResolve() {
         exception_thrown = true;
         throw exception_content;
       });
 
-    let observer_2 = source.promise.then(
+    source.promise.then(
       function onResolve() {
         do_check_true(exception_thrown, "Second observer called after first observer has thrown");
       }
     );
 
     let result = observer_1.then(
       function onResolve() {
         do_throw("observer_1 should not have resolved");
@@ -955,17 +955,16 @@ tests.push(
 
 function wait_for_uncaught(aMustAppear, aTimeout = undefined) {
   let remaining = new Set();
   for (let k of aMustAppear) {
     remaining.add(k);
   }
   let deferred = Promise.defer();
   let print = do_print;
-  let execute_soon = do_execute_soon;
   let observer = function({message, stack}) {
     let data = message + stack;
     print("Observing " + message + ", looking for " + aMustAppear.join(", "));
     for (let expected of remaining) {
       if (data.indexOf(expected) != -1) {
         print("I found " + expected);
         remaining.delete(expected);
       }
--- a/toolkit/modules/tests/xpcshell/test_session_recorder.js
+++ b/toolkit/modules/tests/xpcshell/test_session_recorder.js
@@ -26,17 +26,17 @@ function monkeypatchStartupInfo(recorder
       };
     }
   });
 }
 
 function sleep(wait) {
   let deferred = Promise.defer();
 
-  let timer = CommonUtils.namedTimer(function onTimer() {
+  CommonUtils.namedTimer(function onTimer() {
     deferred.resolve();
   }, wait, deferred.promise, "_sleepTimer");
 
   return deferred.promise;
 }
 
 function getRecorder(name, start, offset) {
   let recorder = new SessionRecorder("testing." + name + ".");
@@ -298,9 +298,8 @@ add_task(function* test_record_activity(
   Services.obs.notifyObservers(null, "user-interaction-active", null);
   do_check_eq(recorder.activeTicks, 4);
 
   Services.obs.notifyObservers(null, "user-interaction-active", null);
   do_check_eq(recorder.activeTicks, 5);
 
   recorder.onShutdown();
 });
-
--- a/toolkit/modules/tests/xpcshell/test_sqlite.js
+++ b/toolkit/modules/tests/xpcshell/test_sqlite.js
@@ -489,17 +489,16 @@ add_task(function* test_shrink_memory() 
   yield c.shrinkMemory();
   yield c.close();
 });
 
 add_task(function* test_no_shrink_on_init() {
   let c = yield getConnection("no_shrink_on_init",
                               {shrinkMemoryOnConnectionIdleMS: 200});
 
-  let oldShrink = c._connectionData.shrinkMemory;
   let count = 0;
   Object.defineProperty(c._connectionData, "shrinkMemory", {
     value: function() {
       count++;
     },
   });
 
   // We should not shrink until a statement has been executed.
@@ -754,21 +753,21 @@ add_task(function* test_programmatic_bin
 
   // Add some data in an implicit transaction before beginning the batch insert.
   yield c.execute(sql, {id: 1, path: "works"});
 
   let secondSucceeded = false;
   try {
     yield c.executeTransaction(function* transaction() {
       // Insert one row. This won't implicitly start a transaction.
-      let result = yield c.execute(sql, bindings[0]);
+      yield c.execute(sql, bindings[0]);
 
       // Insert multiple rows. mozStorage will want to start a transaction.
       // One of the inserts will fail, so the transaction should be rolled back.
-      result = yield c.execute(sql, bindings);
+      yield c.execute(sql, bindings);
       secondSucceeded = true;
     });
   } catch (ex) {
     print("Caught expected exception: " + ex);
   }
 
   // We did not get to the end of our in-transaction block.
   do_check_false(secondSucceeded);
@@ -790,17 +789,17 @@ add_task(function* test_programmatic_bin
     {id: 2, path: "foobar"},
     {id: 1, path: "toofoo"},
   ];
 
   let sql = "INSERT INTO dirs VALUES (:id, :path)";
   let secondSucceeded = false;
   yield c.execute(sql, {id: 1, path: "works"});
   try {
-    let result = yield c.execute(sql, bindings);
+    yield c.execute(sql, bindings);
     secondSucceeded = true;
   } catch (ex) {
     print("Caught expected exception: " + ex);
   }
 
   do_check_false(secondSucceeded);
 
   // The entire batch failed.
@@ -913,17 +912,17 @@ add_task(function* test_cloneStorageConn
   yield c.asyncClose();
   yield clone2.close();
   yield clone.close();
 });
 
 // Test Sqlite.cloneStorageConnection invalid argument.
 add_task(function* test_cloneStorageConnection() {
   try {
-    let clone = yield Sqlite.cloneStorageConnection({ connection: null });
+    yield Sqlite.cloneStorageConnection({ connection: null });
     do_throw(new Error("Should throw on invalid connection"));
   } catch (ex) {
     if (ex.name != "TypeError") {
       throw ex;
     }
   }
 });
 
--- a/toolkit/modules/tests/xpcshell/test_timer.js
+++ b/toolkit/modules/tests/xpcshell/test_timer.js
@@ -39,17 +39,17 @@ add_task(function* test_setInterval() {
   do_check_true(interval1 > 0, "setTimeout returns a positive number");
 
   imported.clearInterval(interval1);
 
   const EXPECTED_CALLS = 5;
   let calls = 0;
 
   yield new Promise((resolve) => {
-    let interval2 = imported.setInterval((param1, param2) => {
+    imported.setInterval((param1, param2) => {
       do_check_true(true, "Should be called");
       do_check_eq(param1, 15, "first parameter is correct");
       do_check_eq(param2, "hola", "second parameter is correct");
       if (calls >= EXPECTED_CALLS) {
         resolve();
       }
       calls++;
     }, 100, 15, "hola");
--- a/toolkit/mozapps/extensions/test/xpcshell/test_syncGUID.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_syncGUID.js
@@ -147,9 +147,8 @@ add_test(function test_addon_manager_get
       AddonManager.getAddonBySyncGUID("DOES_NOT_EXIST", function(missing) {
         do_check_eq(undefined, missing);
 
         run_next_test();
       });
     });
   });
 });
-
--- a/toolkit/mozapps/extensions/test/xpcshell/test_webextension_icons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_webextension_icons.js
@@ -159,9 +159,8 @@ add_task(function*() {
   equal(addon.icon64URL, null);
 
   equal(AddonManager.getPreferredIconURL(addon, 128), null);
 
   addon.uninstall();
 
   yield promiseRestartManager();
 });
-
--- a/toolkit/mozapps/update/nsUpdateService.js
+++ b/toolkit/mozapps/update/nsUpdateService.js
@@ -435,17 +435,17 @@ function getCanApplyUpdates() {
          * requires admin privileges to update other than Program Files.
          */
         let userCanElevate = false;
 
         if (parseFloat(windowsVersion) >= 6) {
           try {
             // KEY_UPDROOT will fail and throw an exception if
             // appDir is not under the Program Files, so we rely on that
-            let dir = Services.dirsvc.get(KEY_UPDROOT, Ci.nsIFile);
+            Services.dirsvc.get(KEY_UPDROOT, Ci.nsIFile);
             // appDir is under Program Files, so check if the user can elevate
             userCanElevate = Services.appinfo.QueryInterface(Ci.nsIWinAppHelper).
                              userCanElevate;
             LOG("getCanApplyUpdates - on Vista, userCanElevate: " + userCanElevate);
           }
           catch (ex) {
             // When the installation directory is not under Program Files,
             // fall through to checking if write access to the
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -1321,17 +1321,17 @@ function getSpecialFolderDir(aCSIDL) {
                                            ctypes.winapi_abi,
                                            ctypes.bool, /* bool(return) */
                                            ctypes.int32_t, /* HWND hwndOwner */
                                            ctypes.char16_t.ptr, /* LPTSTR lpszPath */
                                            ctypes.int32_t, /* int csidl */
                                            ctypes.bool /* BOOL fCreate */);
 
   let aryPath = ctypes.char16_t.array()(260);
-  let rv = SHGetSpecialFolderPath(0, aryPath, aCSIDL, false);
+  SHGetSpecialFolderPath(0, aryPath, aCSIDL, false);
   lib.close();
 
   let path = aryPath.readString(); // Convert the c-string to js-string
   if (!path) {
     return null;
   }
   debugDump("SHGetSpecialFolderPath returned path: " + path);
   let dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
@@ -4070,18 +4070,16 @@ function runUpdateUsingApp(aExpectedStat
       return;
     }
 
     do_execute_soon(runUpdateFinished);
   }
 
   debugDump("start - launching application to apply update");
 
-  let appBin = getApplyDirFile(DIR_MACOS + FILE_APP_BIN, false);
-
   let launchBin = getLaunchBin();
   let args = getProcessArgs();
   debugDump("launching " + launchBin.path + " " + args.join(" "));
 
   gProcess = Cc["@mozilla.org/process/util;1"].
              createInstance(Ci.nsIProcess);
   gProcess.init(launchBin);
 
--- a/toolkit/profile/content/profileSelection.js
+++ b/toolkit/profile/content/profileSelection.js
@@ -222,17 +222,16 @@ function RenameProfile()
     return true;
   }
 
   return false;
 }
 
 function ConfirmDelete()
 {
-  var deleteButton = document.getElementById("delbutton");
   var profileList = document.getElementById( "profiles" );
 
   var selectedItem = profileList.selectedItem;
   if (!selectedItem) {
     return false;
   }
 
   var selectedProfile = selectedItem.profile;