Merge mozilla-inbound to m-c a=merge CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Wed, 16 Sep 2015 10:52:53 -0700
changeset 295393 3618c94059d846c4285bf187924aad4da93edb40
parent 295256 c9f80af980feb7330fda11438aed86ee541f1e86 (current diff)
parent 295392 5d135736c0a11630113a1e1a74a70b12f9dbf1ec (diff)
child 295429 e7d613b3bcfe1e865378bfac37de64560d1234ec
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone43.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
Merge mozilla-inbound to m-c a=merge CLOSED TREE
browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/Makefile.in
browser/base/content/browser.js
browser/base/content/test/general/browser_permissions.js
browser/devtools/framework/selection.js
browser/devtools/shared/test/test-actor.js
browser/devtools/tilt/test/head.js
browser/devtools/tilt/tilt-utils.js
browser/devtools/webaudioeditor/controller.js
browser/devtools/webaudioeditor/views/inspector.js
browser/devtools/webide/test/head.js
dom/media/mediasource/MediaSourceReader.cpp
dom/media/mediasource/MediaSourceReader.h
dom/media/mediasource/SourceBufferDecoder.cpp
dom/media/mediasource/SourceBufferDecoder.h
dom/media/mediasource/TrackBuffer.cpp
dom/media/mediasource/TrackBuffer.h
dom/media/platforms/SharedDecoderManager.cpp
dom/media/platforms/SharedDecoderManager.h
dom/media/platforms/ffmpeg/FFmpegLog.cpp
dom/workers/MessagePort.cpp
dom/workers/MessagePort.h
js/src/jit/mips32/Bailouts-mips32.h
layout/reftests/writing-mode/tables/table-caption-block-end-1-ref.html
layout/reftests/writing-mode/tables/table-caption-block-end-1.html
layout/reftests/writing-mode/tables/table-caption-block-start-1-ref.html
layout/reftests/writing-mode/tables/table-caption-block-start-1.html
layout/reftests/writing-mode/tables/table-caption-inline-end-1-ref.html
layout/reftests/writing-mode/tables/table-caption-inline-end-1.html
layout/reftests/writing-mode/tables/table-caption-inline-start-1-ref.html
layout/reftests/writing-mode/tables/table-caption-inline-start-1.html
media/webrtc/signaling/src/jsep/JsepTrackImpl.h
testing/web-platform/mozilla/meta/service-workers/service-worker/register-same-scope-different-script-url.https.html.ini
testing/web-platform/mozilla/meta/service-workers/service-worker/serviceworkerobject-scripturl.sub.html.ini
testing/web-platform/mozilla/tests/service-workers/service-worker/serviceworkerobject-scripturl.sub.html
toolkit/devtools/gcli/commands/highlight.js
toolkit/devtools/server/actors/inspector.js
toolkit/devtools/server/actors/storage.js
toolkit/devtools/server/actors/webaudio.js
toolkit/devtools/server/moz.build
toolkit/devtools/server/protocol.js
toolkit/devtools/server/tests/unit/test_protocol_children.js
toolkit/devtools/styleinspector/css-logic.js
toolkit/devtools/webconsole/utils.js
--- a/accessible/ipc/DocAccessibleParent.cpp
+++ b/accessible/ipc/DocAccessibleParent.cpp
@@ -101,16 +101,23 @@ DocAccessibleParent::AddSubtree(ProxyAcc
 bool
 DocAccessibleParent::RecvHideEvent(const uint64_t& aRootID)
 {
   if (mShutdown)
     return true;
 
   MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
 
+  // We shouldn't actually need this because mAccessibles shouldn't have an
+  // entry for the document itself, but it doesn't hurt to be explicit.
+  if (!aRootID) {
+    NS_ERROR("trying to hide entire document?");
+    return false;
+  }
+
   ProxyEntry* rootEntry = mAccessibles.GetEntry(aRootID);
   if (!rootEntry) {
     NS_ERROR("invalid root being removed!");
     return true;
   }
 
   ProxyAccessible* root = rootEntry->mProxy;
   if (!root) {
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -99,17 +99,17 @@ public:
     aChildDoc->Parent()->SetChildDoc(nullptr);
     mChildDocs.RemoveElement(aChildDoc);
     aChildDoc->mParentDoc = nullptr;
     MOZ_ASSERT(aChildDoc->mChildDocs.Length() == 0);
   }
 
   void RemoveAccessible(ProxyAccessible* aAccessible)
   {
-    MOZ_ASSERT(mAccessibles.GetEntry(aAccessible->ID()));
+    MOZ_DIAGNOSTIC_ASSERT(mAccessibles.GetEntry(aAccessible->ID()));
     mAccessibles.RemoveEntry(aAccessible->ID());
   }
 
   /**
    * Return the accessible for given id.
    */
   ProxyAccessible* GetAccessible(uintptr_t aID)
   {
--- a/accessible/ipc/ProxyAccessible.cpp
+++ b/accessible/ipc/ProxyAccessible.cpp
@@ -16,16 +16,17 @@
 #include "mozilla/a11y/Role.h"
 
 namespace mozilla {
 namespace a11y {
 
 void
 ProxyAccessible::Shutdown()
 {
+  MOZ_DIAGNOSTIC_ASSERT(!IsDoc());
   NS_ASSERTION(!mOuterDoc, "Why do we still have a child doc?");
 
   // XXX Ideally  this wouldn't be necessary, but it seems OuterDoc accessibles
   // can be destroyed before the doc they own.
   if (!mOuterDoc) {
     uint32_t childCount = mChildren.Length();
     for (uint32_t idx = 0; idx < childCount; idx++)
       mChildren[idx]->Shutdown();
--- a/accessible/jsat/ContentControl.jsm
+++ b/accessible/jsat/ContentControl.jsm
@@ -1,14 +1,14 @@
 /* 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/. */
 
-let Ci = Components.interfaces;
-let Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, 'Services',
   'resource://gre/modules/Services.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Utils',
   'resource://gre/modules/accessibility/Utils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Logger',
   'resource://gre/modules/accessibility/Utils.jsm');
--- a/accessible/jsat/OutputGenerator.jsm
+++ b/accessible/jsat/OutputGenerator.jsm
@@ -27,17 +27,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   'resource://gre/modules/accessibility/Utils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Roles', // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'States', // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 
 this.EXPORTED_SYMBOLS = ['UtteranceGenerator', 'BrailleGenerator']; // jshint ignore:line
 
-let OutputGenerator = {
+var OutputGenerator = {
 
   defaultOutputOrder: OUTPUT_DESC_LAST,
 
   /**
    * Generates output for a PivotContext.
    * @param {PivotContext} aContext object that generates and caches
    *    context information for a given accessible and its relationship with
    *    another accessible.
--- a/accessible/jsat/PointerAdapter.jsm
+++ b/accessible/jsat/PointerAdapter.jsm
@@ -24,17 +24,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, 'GestureTracker', // jshint ignore:line
   'resource://gre/modules/accessibility/Gestures.jsm');
 
 // The virtual touch ID generated by a mouse event.
 const MOUSE_ID = 'mouse';
 // Synthesized touch ID.
 const SYNTH_ID = -1;
 
-let PointerRelay = { // jshint ignore:line
+var PointerRelay = { // jshint ignore:line
   /**
    * A mapping of events we should be intercepting. Entries with a value of
    * |true| are used for compiling high-level gesture events. Entries with a
    * value of |false| are cancelled and do not propogate to content.
    */
   get _eventsOfInterest() {
     delete this._eventsOfInterest;
 
--- a/accessible/jsat/Traversal.jsm
+++ b/accessible/jsat/Traversal.jsm
@@ -19,17 +19,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Filters',  // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'States',  // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Prefilters',  // jshint ignore:line
   'resource://gre/modules/accessibility/Constants.jsm');
 
-let gSkipEmptyImages = new PrefCache('accessibility.accessfu.skip_empty_images');
+var gSkipEmptyImages = new PrefCache('accessibility.accessfu.skip_empty_images');
 
 function BaseTraversalRule(aRoles, aMatchFunc, aPreFilter, aContainerRule) {
   this._explicitMatchRoles = new Set(aRoles);
   this._matchRoles = aRoles;
   if (aRoles.length) {
     if (aRoles.indexOf(Roles.LABEL) < 0) {
       this._matchRoles.push(Roles.LABEL);
     }
--- a/accessible/jsat/content-script.js
+++ b/accessible/jsat/content-script.js
@@ -1,14 +1,14 @@
 /* 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/. */
 
-let Ci = Components.interfaces;
-let Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Logger',
   'resource://gre/modules/accessibility/Utils.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Presentation',
   'resource://gre/modules/accessibility/Presentation.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Utils',
   'resource://gre/modules/accessibility/Utils.jsm');
@@ -18,18 +18,18 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   'resource://gre/modules/accessibility/ContentControl.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'Roles',
   'resource://gre/modules/accessibility/Constants.jsm');
 XPCOMUtils.defineLazyModuleGetter(this, 'States',
   'resource://gre/modules/accessibility/Constants.jsm');
 
 Logger.info('content-script.js', content.document.location);
 
-let eventManager = null;
-let contentControl = null;
+var eventManager = null;
+var contentControl = null;
 
 function forwardToParent(aMessage) {
   // XXX: This is a silly way to make a deep copy
   let newJSON = JSON.parse(JSON.stringify(aMessage.json));
   newJSON.origin = 'child';
   sendAsyncMessage(aMessage.name, newJSON);
 }
 
--- a/addon-sdk/source/app-extension/bootstrap.js
+++ b/addon-sdk/source/app-extension/bootstrap.js
@@ -29,22 +29,22 @@ const vc = Cc["@mozilla.org/xpcom/versio
 const Startup = Cu.import("resource://gre/modules/sdk/system/Startup.js", {}).exports;
 
 
 const REASON = [ 'unknown', 'startup', 'shutdown', 'enable', 'disable',
                  'install', 'uninstall', 'upgrade', 'downgrade' ];
 
 const bind = Function.call.bind(Function.bind);
 
-let loader = null;
-let unload = null;
-let cuddlefishSandbox = null;
-let nukeTimer = null;
+var loader = null;
+var unload = null;
+var cuddlefishSandbox = null;
+var nukeTimer = null;
 
-let resourceDomains = [];
+var resourceDomains = [];
 function setResourceSubstitution(domain, uri) {
   resourceDomains.push(domain);
   resourceHandler.setSubstitution(domain, uri);
 }
 
 // Utility function that synchronously reads local resource from the given
 // `uri` and returns content string.
 function readURI(uri) {
--- a/addon-sdk/source/examples/toolbar-api/lib/main.js
+++ b/addon-sdk/source/examples/toolbar-api/lib/main.js
@@ -2,45 +2,45 @@
  * 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/. */
 "use strict";
 
 const { Toolbar } = require("sdk/ui/toolbar");
 const { Frame } = require("sdk/ui/frame");
 const { ActionButton } = require("sdk/ui/button/action");
 
-let button = new ActionButton({
+var button = new ActionButton({
   id: "button",
   label: "send!",
   icon: "./favicon.ico",
   onClick: () => {
     frame.postMessage({
       hello: "content"
     });
   }
 });
 
-let frame = new Frame({
+var frame = new Frame({
     url: "./index.html",
     onAttach: () => {
       console.log("frame was attached");
     },
     onReady: () => {
       console.log("frame document was loaded");
     },
     onLoad: () => {
       console.log("frame load complete");
     },
     onMessage: (event) => {
       console.log("got message from frame content", event);
       if (event.data === "ping!")
         event.source.postMessage("pong!", event.source.origin);
     }
 });
-let toolbar = new Toolbar({
+var toolbar = new Toolbar({
   items: [frame],
   title: "Addon Demo",
   hidden: false,
   onShow: () => {
     console.log("toolbar was shown");
   },
   onHide: () => {
     console.log("toolbar was hidden");
--- a/addon-sdk/source/lib/dev/ports.js
+++ b/addon-sdk/source/lib/dev/ports.js
@@ -10,17 +10,17 @@ module.metadata = {
 
 // This module provides `marshal` and `demarshal` functions
 // that can be used to send  MessagePort's over `nsIFrameMessageManager`
 // until Bug 914974 is fixed.
 
 const { add, iterator } = require("../sdk/lang/weak-set");
 const { curry } = require("../sdk/lang/functional");
 
-let id = 0;
+var id = 0;
 const ports = new WeakMap();
 
 // Takes `nsIFrameMessageManager` and `MessagePort` instances
 // and returns a handle representing given `port`. Messages
 // received on given `port` will be forwarded to a message
 // manager under `sdk/port/message` and messages like:
 // { port: { type: "MessagePort", id: 2}, data: data }
 // Where id is an identifier associated with a given `port`
--- a/addon-sdk/source/lib/framescript/FrameScriptManager.jsm
+++ b/addon-sdk/source/lib/framescript/FrameScriptManager.jsm
@@ -8,17 +8,17 @@ const globalMM = Components.classes["@mo
 
 // Load frame scripts from the same dir as this module.
 // Since this JSM will be loaded using require(), PATH will be
 // overridden while running tests, just like any other module.
 const PATH = __URI__.replace('framescript/FrameScriptManager.jsm', '');
 
 // Builds a unique loader ID for this runtime. We prefix with the SDK path so
 // overriden versions of the SDK don't conflict
-let LOADER_ID = 0;
+var LOADER_ID = 0;
 this.getNewLoaderID = () => {
   return PATH + ":" + LOADER_ID++;
 }
 
 const frame_script = function(contentFrame, PATH) {
   let { registerContentFrame } = Components.utils.import(PATH + 'framescript/content.jsm', {});
   registerContentFrame(contentFrame);
 }
--- a/addon-sdk/source/lib/framescript/content.jsm
+++ b/addon-sdk/source/lib/framescript/content.jsm
@@ -13,17 +13,17 @@ this.EXPORTED_SYMBOLS = ["registerConten
 
 // This may be an overriden version of the SDK so use the PATH as a key for the
 // initial messages before we have a loaderID.
 const PATH = __URI__.replace('framescript/content.jsm', '');
 
 const { Loader } = Cu.import(PATH + 'toolkit/loader.js', {});
 
 // one Loader instance per addon (per @loader/options to be precise)
-let addons = new Map();
+var addons = new Map();
 
 // Tell the parent that a new process is ready
 cpmm.sendAsyncMessage('sdk/remote/process/start', {
   modulePath: PATH
 });
 
 // Load a child process module loader with the given loader options
 cpmm.addMessageListener('sdk/remote/process/load', ({ data: { modulePath, loaderID, options, reason } }) => {
@@ -62,17 +62,17 @@ cpmm.addMessageListener('sdk/remote/proc
   Loader.unload(addon.loader, reason);
 
   // We want to drop the reference to the loader but never allow creating a new
   // loader with the same ID
   addons.set(loaderID, {});
 })
 
 
-let frames = new Set();
+var frames = new Set();
 
 this.registerContentFrame = contentFrame => {
   contentFrame.addEventListener("unload", () => {
     unregisterContentFrame(contentFrame);
   }, false);
 
   frames.add(contentFrame);
 
--- a/addon-sdk/source/lib/sdk/addon/events.js
+++ b/addon-sdk/source/lib/sdk/addon/events.js
@@ -3,29 +3,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
 module.metadata = {
   'stability': 'experimental'
 };
 
-let { request: hostReq, response: hostRes } = require('./host');
-let { defer: async } = require('../lang/functional');
-let { defer } = require('../core/promise');
-let { emit: emitSync, on, off } = require('../event/core');
-let { uuid } = require('../util/uuid');
-let emit = async(emitSync);
+var { request: hostReq, response: hostRes } = require('./host');
+var { defer: async } = require('../lang/functional');
+var { defer } = require('../core/promise');
+var { emit: emitSync, on, off } = require('../event/core');
+var { uuid } = require('../util/uuid');
+var emit = async(emitSync);
 
 // Map of IDs to deferreds
-let requests = new Map();
+var requests = new Map();
 
 // May not be necessary to wrap this in `async`
 // once promises are async via bug 881047
-let receive = async(function ({data, id, error}) {
+var receive = async(function ({data, id, error}) {
   let request = requests.get(id);
   if (request) {
     if (error) request.reject(error);
     else request.resolve(clone(data));
     requests.delete(id);
   }
 });
 on(hostRes, 'data', receive);
--- a/addon-sdk/source/lib/sdk/addon/window.js
+++ b/addon-sdk/source/lib/sdk/addon/window.js
@@ -9,53 +9,53 @@ module.metadata = {
 
 const { Ci, Cc } = require("chrome");
 const { make: makeWindow, getHiddenWindow } = require("../window/utils");
 const { create: makeFrame, getDocShell } = require("../frame/utils");
 const { defer } = require("../core/promise");
 const { when: unload } = require("../system/unload");
 const cfxArgs = require("../test/options");
 
-let addonPrincipal = Cc["@mozilla.org/systemprincipal;1"].
+var addonPrincipal = Cc["@mozilla.org/systemprincipal;1"].
                      createInstance(Ci.nsIPrincipal);
 
-let hiddenWindow = getHiddenWindow();
+var hiddenWindow = getHiddenWindow();
 
 if (cfxArgs.parseable) {
   console.info("hiddenWindow document.documentURI:" +
     hiddenWindow.document.documentURI);
   console.info("hiddenWindow document.readyState:" +
     hiddenWindow.document.readyState);
 }
 
 // Once Bug 565388 is fixed and shipped we'll be able to make invisible,
 // permanent docShells. Meanwhile we create hidden top level window and
 // use it's docShell.
-let frame = makeFrame(hiddenWindow.document, {
+var frame = makeFrame(hiddenWindow.document, {
   nodeName: "iframe",
   namespaceURI: "http://www.w3.org/1999/xhtml",
   allowJavascript: true,
   allowPlugins: true
 })
-let docShell = getDocShell(frame);
-let eventTarget = docShell.chromeEventHandler;
+var docShell = getDocShell(frame);
+var eventTarget = docShell.chromeEventHandler;
 
 // We need to grant docShell system principals in order to load XUL document
 // from data URI into it.
 docShell.createAboutBlankContentViewer(addonPrincipal);
 
 // Get a reference to the DOM window of the given docShell and load
 // such document into that would allow us to create XUL iframes, that
 // are necessary for hidden frames etc..
-let window = docShell.contentViewer.DOMDocument.defaultView;
+var window = docShell.contentViewer.DOMDocument.defaultView;
 window.location = "data:application/vnd.mozilla.xul+xml;charset=utf-8,<window/>";
 
 // Create a promise that is delivered once add-on window is interactive,
 // used by add-on runner to defer add-on loading until window is ready.
-let { promise, resolve } = defer();
+var { promise, resolve } = defer();
 eventTarget.addEventListener("DOMContentLoaded", function handler(event) {
   eventTarget.removeEventListener("DOMContentLoaded", handler, false);
   resolve();
 }, false);
 
 exports.ready = promise;
 exports.window = window;
 
--- a/addon-sdk/source/lib/sdk/clipboard.js
+++ b/addon-sdk/source/lib/sdk/clipboard.js
@@ -52,23 +52,23 @@ get an alias. New aliases must be approv
 Jetpack API druid.
 */
 const kFlavorMap = [
   { short: "text", long: "text/unicode" },
   { short: "html", long: "text/html" },
   { short: "image", long: "image/png" }
 ];
 
-let clipboardService = Cc["@mozilla.org/widget/clipboard;1"].
+var clipboardService = Cc["@mozilla.org/widget/clipboard;1"].
                        getService(Ci.nsIClipboard);
 
-let clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].
+var clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].
                       getService(Ci.nsIClipboardHelper);
 
-let imageTools = Cc["@mozilla.org/image/tools;1"].
+var imageTools = Cc["@mozilla.org/image/tools;1"].
                getService(Ci.imgITools);
 
 exports.set = function(aData, aDataType) {
 
   let options = {
     data: aData,
     datatype: aDataType || "text"
   };
--- a/addon-sdk/source/lib/sdk/console/plain-text.js
+++ b/addon-sdk/source/lib/sdk/console/plain-text.js
@@ -13,37 +13,37 @@ const self = require("../self");
 const prefs = require("../preferences/service");
 const { merge } = require("../util/object");
 const { ConsoleAPI } = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
 
 const DEFAULT_LOG_LEVEL = "error";
 const ADDON_LOG_LEVEL_PREF = "extensions." + self.id + ".sdk.console.logLevel";
 const SDK_LOG_LEVEL_PREF = "extensions.sdk.console.logLevel";
 
-let logLevel = DEFAULT_LOG_LEVEL;
+var logLevel = DEFAULT_LOG_LEVEL;
 function setLogLevel() {
   logLevel = prefs.get(ADDON_LOG_LEVEL_PREF,
                            prefs.get(SDK_LOG_LEVEL_PREF,
                                      DEFAULT_LOG_LEVEL));
 }
 setLogLevel();
 
-let logLevelObserver = {
+var logLevelObserver = {
   QueryInterface: function(iid) {
     if (!iid.equals(Ci.nsIObserver) &&
         !iid.equals(Ci.nsISupportsWeakReference) &&
         !iid.equals(Ci.nsISupports))
       throw Cr.NS_ERROR_NO_INTERFACE;
     return this;
   },
   observe: function(subject, topic, data) {
     setLogLevel();
   }
 };
-let branch = Cc["@mozilla.org/preferences-service;1"].
+var branch = Cc["@mozilla.org/preferences-service;1"].
              getService(Ci.nsIPrefService).
              getBranch(null);
 branch.addObserver(ADDON_LOG_LEVEL_PREF, logLevelObserver, true);
 branch.addObserver(SDK_LOG_LEVEL_PREF, logLevelObserver, true);
 
 function PlainTextConsole(print, innerID) {
 
   let consoleOptions = {
--- a/addon-sdk/source/lib/sdk/content/context-menu.js
+++ b/addon-sdk/source/lib/sdk/content/context-menu.js
@@ -91,30 +91,30 @@ const NON_PAGE_CONTEXT_ELTS = [
   Ci.nsIDOMHTMLObjectElement,
   Ci.nsIDOMHTMLOptionElement,
   Ci.nsIDOMHTMLSelectElement,
   Ci.nsIDOMHTMLTextAreaElement,
 ];
 
 // List all editable types of inputs.  Or is it better to have a list
 // of non-editable inputs?
-let editableInputs = {
+var editableInputs = {
   email: true,
   number: true,
   password: true,
   search: true,
   tel: true,
   text: true,
   textarea: true,
   url: true
 };
 
-let CONTEXTS = {};
+var CONTEXTS = {};
 
-let Context = Class({
+var Context = Class({
   initialize: function(id) {
     this.id = id;
   },
 
   adjustPopupNode: function adjustPopupNode(popupNode) {
     return popupNode;
   },
 
@@ -245,17 +245,17 @@ CONTEXTS.PredicateContext = Class({
 function instantiateContext({ id, type, args }) {
   if (!(type in CONTEXTS)) {
     console.error("Attempt to use unknown context " + type);
     return;
   }
   return new CONTEXTS[type](id, ...args);
 }
 
-let ContextWorker = Class({
+var ContextWorker = Class({
   implements: [ WorkerChild ],
 
   // Calls the context workers context listeners and returns the first result
   // that is either a string or a value that evaluates to true. If all of the
   // listeners returned false then returns false. If there are no listeners,
   // returns true (show the menu item by default).
   getMatchedContext: function getCurrentContexts(popupNode) {
     let results = this.sandbox.emitSync("context", popupNode);
@@ -299,17 +299,17 @@ function getItemWorkerForWindow(item, wi
   item.workerMap.set(id, worker);
 
   return worker;
 }
 
 // A very simple remote proxy for every item. It's job is to provide data for
 // the main process to use to determine visibility state and to call into
 // content scripts when clicked.
-let RemoteItem = Class({
+var RemoteItem = Class({
   initialize: function(options, manager) {
     this.id = options.id;
     this.contexts = [instantiateContext(c) for (c of options.contexts)];
     this.contentScript = options.contentScript;
     this.contentScriptFile = options.contentScriptFile;
 
     this.manager = manager;
 
@@ -357,17 +357,17 @@ let RemoteItem = Class({
       hasWorker: !!worker,
       workerContext: worker ? worker.getMatchedContext(popupNode) : true
     }
   }
 });
 exports.RemoteItem = RemoteItem;
 
 // Holds remote items for this frame.
-let keepAlive = new Map();
+var keepAlive = new Map();
 
 // Called to create remote proxies for items. If they already exist we destroy
 // and recreate. This can happen if the item changes in some way or in odd
 // timing cases where the frame script is create around the same time as the
 // item is created in the main process
 process.port.on('sdk/contextmenu/createitems', (process, items) => {
   for (let itemoptions of items) {
     let oldItem = keepAlive.get(itemoptions.id);
@@ -381,17 +381,17 @@ process.port.on('sdk/contextmenu/createi
 
 process.port.on('sdk/contextmenu/destroyitems', (process, items) => {
   for (let id of items) {
     let item = keepAlive.get(id);
     item.destroy();
   }
 });
 
-let lastPopupNode = null;
+var lastPopupNode = null;
 
 system.on('content-contextmenu', ({ subject }) => {
   let { event: { target: popupNode }, addonInfo } = subject.wrappedJSObject;
   lastPopupNode = popupNode;
 
   for (let item of keepAlive.values()) {
     item.getContextState(popupNode, addonInfo);
   }
--- a/addon-sdk/source/lib/sdk/content/events.js
+++ b/addon-sdk/source/lib/sdk/content/events.js
@@ -14,24 +14,24 @@ const { observe } = require("../event/ch
 const { filter, merge, map, expand } = require("../event/utils");
 const { windows } = require("../window/utils");
 const { events: windowEvents } = require("sdk/window/events");
 
 // Note: Please note that even though pagehide event is included
 // it's not observable reliably since it's not always triggered
 // when closing tabs. Implementation can be imrpoved once that
 // event will be necessary.
-let TYPES = ["DOMContentLoaded", "load", "pageshow", "pagehide"];
+var TYPES = ["DOMContentLoaded", "load", "pageshow", "pagehide"];
 
-let insert = observe("document-element-inserted");
-let windowCreate = merge([
+var insert = observe("document-element-inserted");
+var windowCreate = merge([
   observe("content-document-global-created"),
   observe("chrome-document-global-created")
 ]);
-let create = map(windowCreate, function({target, data, type}) {
+var create = map(windowCreate, function({target, data, type}) {
   return { target: target.document, type: type, data: data }
 });
 
 function streamEventsFrom({document}) {
   // Map supported event types to a streams of those events on the given
   // `window` for the inserted document and than merge these streams into
   // single form stream off all window state change events.
   let stateChanges = TYPES.map(function(type) {
@@ -40,18 +40,18 @@ function streamEventsFrom({document}) {
 
   // Since load events on document occur for every loded resource
   return filter(merge(stateChanges), function({target}) {
     return target instanceof Ci.nsIDOMDocument
   })
 }
 exports.streamEventsFrom = streamEventsFrom;
 
-let opened = windows(null, { includePrivate: true });
-let state = merge(opened.map(streamEventsFrom));
+var opened = windows(null, { includePrivate: true });
+var state = merge(opened.map(streamEventsFrom));
 
 
-let futureReady = filter(windowEvents, function({type})
+var futureReady = filter(windowEvents, function({type})
                                         type === "DOMContentLoaded");
-let futureWindows = map(futureReady, function({target}) target);
-let futureState = expand(futureWindows, streamEventsFrom);
+var futureWindows = map(futureReady, function({target}) target);
+var futureState = expand(futureWindows, streamEventsFrom);
 
 exports.events = merge([insert, create, state, futureState]);
--- a/addon-sdk/source/lib/sdk/content/mod.js
+++ b/addon-sdk/source/lib/sdk/content/mod.js
@@ -6,33 +6,33 @@
 module.metadata = {
   "stability": "experimental"
 };
 
 const { Ci } = require("chrome");
 const { dispatcher } = require("../util/dispatcher");
 const { add, remove, iterator } = require("../lang/weak-set");
 
-let getTargetWindow = dispatcher("getTargetWindow");
+var getTargetWindow = dispatcher("getTargetWindow");
 
 getTargetWindow.define(function (target) {
   if (target instanceof Ci.nsIDOMWindow)
     return target;
   if (target instanceof Ci.nsIDOMDocument)
     return target.defaultView || null;
 
   return null;
 });
 
 exports.getTargetWindow = getTargetWindow;
 
-let attachTo = dispatcher("attachTo");
+var attachTo = dispatcher("attachTo");
 exports.attachTo = attachTo;
 
-let detachFrom = dispatcher("detatchFrom");
+var detachFrom = dispatcher("detatchFrom");
 exports.detachFrom = detachFrom;
 
 function attach(modification, target) {
   if (!modification)
     return;
 
   let window = getTargetWindow(target);
 
--- a/addon-sdk/source/lib/sdk/content/page-mod.js
+++ b/addon-sdk/source/lib/sdk/content/page-mod.js
@@ -27,20 +27,20 @@ const { has, hasAny } = require("../util
 const { Rules } = require("../util/rules");
 const { List, addListItem, removeListItem } = require('../util/list');
 const { when } = require("../system/unload");
 const { uuid } = require('../util/uuid');
 const { frames, process } = require('../remote/child');
 
 const pagemods = new Map();
 const styles = new WeakMap();
-let styleFor = (mod) => styles.get(mod);
+var styleFor = (mod) => styles.get(mod);
 
 // Helper functions
-let modMatchesURI = (mod, uri) => mod.include.matchesAny(uri) && !mod.exclude.matchesAny(uri);
+var modMatchesURI = (mod, uri) => mod.include.matchesAny(uri) && !mod.exclude.matchesAny(uri);
 
 /**
  * PageMod constructor (exported below).
  * @constructor
  */
 const ChildPageMod = Class({
   implements: [
     EventTarget,
--- a/addon-sdk/source/lib/sdk/content/sandbox.js
+++ b/addon-sdk/source/lib/sdk/content/sandbox.js
@@ -24,17 +24,17 @@ const { PlainTextConsole } = require('..
 const { data } = require('../self');const { isChildLoader } = require('../remote/core');
 // WeakMap of sandboxes so we can access private values
 const sandboxes = new WeakMap();
 
 /* Trick the linker in order to ensure shipping these files in the XPI.
   require('./content-worker.js');
   Then, retrieve URL of these files in the XPI:
 */
-let prefix = module.uri.split('sandbox.js')[0];
+var prefix = module.uri.split('sandbox.js')[0];
 const CONTENT_WORKER_URL = prefix + 'content-worker.js';
 const metadata = require('@loader/options').metadata;
 
 // Fetch additional list of domains to authorize access to for each content
 // script. It is stored in manifest `metadata` field which contains
 // package.json data. This list is originaly defined by authors in
 // `permissions` attribute of their package.json addon file.
 const permissions = (metadata && metadata['permissions']) || {};
--- a/addon-sdk/source/lib/sdk/content/utils.js
+++ b/addon-sdk/source/lib/sdk/content/utils.js
@@ -2,22 +2,22 @@
  * 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/. */
 'use strict';
 
 module.metadata = {
   'stability': 'unstable'
 };
 
-let { merge } = require('../util/object');
-let { data } = require('../self');
-let assetsURI = data.url();
-let isArray = Array.isArray;
-let method = require('../../method/core');
-let { uuid } = require('../util/uuid');
+var { merge } = require('../util/object');
+var { data } = require('../self');
+var assetsURI = data.url();
+var isArray = Array.isArray;
+var method = require('../../method/core');
+var { uuid } = require('../util/uuid');
 
 const isAddonContent = ({ contentURL }) =>
   contentURL && data.url(contentURL).startsWith(assetsURI);
 
 exports.isAddonContent = isAddonContent;
 
 function hasContentScript({ contentScript, contentScriptFile }) {
   return (isArray(contentScript) ? contentScript.length > 0 :
@@ -38,26 +38,26 @@ function getAttachEventType(model) {
   return requiresAddonGlobal(model) ? 'document-element-inserted' :
          when === 'start' ? 'document-element-inserted' :
          when === 'ready' ? 'DOMContentLoaded' :
          when === 'end' ? 'load' :
          null;
 }
 exports.getAttachEventType = getAttachEventType;
 
-let attach = method('worker-attach');
+var attach = method('worker-attach');
 exports.attach = attach;
 
-let connect = method('worker-connect');
+var connect = method('worker-connect');
 exports.connect = connect;
 
-let detach = method('worker-detach');
+var detach = method('worker-detach');
 exports.detach = detach;
 
-let destroy = method('worker-destroy');
+var destroy = method('worker-destroy');
 exports.destroy = destroy;
 
 function WorkerHost (workerFor) {
   // Define worker properties that just proxy to underlying worker
   return ['postMessage', 'port', 'url', 'tab'].reduce(function(proto, name) {
     // Use descriptor properties instead so we can call
     // the worker function in the context of the worker so we
     // don't have to create new functions with `fn.bind(worker)`
--- a/addon-sdk/source/lib/sdk/content/worker-child.js
+++ b/addon-sdk/source/lib/sdk/content/worker-child.js
@@ -125,17 +125,17 @@ function exceptions(key, value) {
   if (!isObject(value) || !instanceOf(value, Error))
     return value;
   let _errorType = value.constructor.name;
   let { message, fileName, lineNumber, stack, name } = value;
   return { _errorType, message, fileName, lineNumber, stack, name };
 }
 
 // workers for windows in this tab
-let keepAlive = new Map();
+var keepAlive = new Map();
 
 process.port.on('sdk/worker/create', (process, options) => {
   options.window = getByInnerId(options.windowId);
   if (!options.window)
     return;
 
   let worker = new WorkerChild(options);
 });
--- a/addon-sdk/source/lib/sdk/content/worker.js
+++ b/addon-sdk/source/lib/sdk/content/worker.js
@@ -19,17 +19,17 @@ const { attach, connect, detach, destroy
 const { ensure } = require('../system/unload');
 const { on: observe } = require('../system/events');
 const { Ci } = require('chrome');
 const { modelFor: tabFor } = require('sdk/model/core');
 const { remoteRequire, processes, frames } = require('../remote/parent');
 remoteRequire('sdk/content/worker-child');
 
 const workers = new WeakMap();
-let modelFor = (worker) => workers.get(worker);
+var modelFor = (worker) => workers.get(worker);
 
 const ERR_DESTROYED = "Couldn't find the worker to receive this message. " +
   "The script may not be initialized yet, or may already have been unloaded.";
 
 // a handle for communication between content script and addon code
 const Worker = Class({
   implements: [EventTarget],
 
--- a/addon-sdk/source/lib/sdk/context-menu.js
+++ b/addon-sdk/source/lib/sdk/context-menu.js
@@ -56,36 +56,36 @@ const OVERFLOW_MENU_ACCESSKEY = "A";
 
 // The class of the overflow sub-xul:menu.
 const OVERFLOW_MENU_CLASS = "addon-content-menu-overflow-menu";
 
 // The class of the overflow submenu's xul:menupopup.
 const OVERFLOW_POPUP_CLASS = "addon-content-menu-overflow-popup";
 
 // Holds private properties for API objects
-let internal = ns();
+var internal = ns();
 
 // A little hacky but this is the last process ID that last opened the context
 // menu
-let lastContextProcessId = null;
+var lastContextProcessId = null;
 
 function uuid() {
   return require('./util/uuid').uuid().toString();
 }
 
 function getScheme(spec) {
   try {
     return URL(spec).scheme;
   }
   catch(e) {
     return null;
   }
 }
 
-let Context = Class({
+var Context = Class({
   initialize: function() {
     internal(this).id = uuid();
   },
 
   // Returns the node that made this context current
   adjustPopupNode: function adjustPopupNode(popupNode) {
     return popupNode;
   },
@@ -93,46 +93,46 @@ let Context = Class({
   // Returns whether this context is current for the current node
   isCurrent: function isCurrent(state) {
     return state;
   }
 });
 
 // Matches when the context-clicked node doesn't have any of
 // NON_PAGE_CONTEXT_ELTS in its ancestors
-let PageContext = Class({
+var PageContext = Class({
   extends: Context,
 
   serialize: function() {
     return {
       id: internal(this).id,
       type: "PageContext",
       args: []
     }
   }
 });
 exports.PageContext = PageContext;
 
 // Matches when there is an active selection in the window
-let SelectionContext = Class({
+var SelectionContext = Class({
   extends: Context,
 
   serialize: function() {
     return {
       id: internal(this).id,
       type: "SelectionContext",
       args: []
     }
   }
 });
 exports.SelectionContext = SelectionContext;
 
 // Matches when the context-clicked node or any of its ancestors matches the
 // selector given
-let SelectorContext = Class({
+var SelectorContext = Class({
   extends: Context,
 
   initialize: function initialize(selector) {
     Context.prototype.initialize.call(this);
     let options = validateOptions({ selector: selector }, {
       selector: {
         is: ["string"],
         msg: "selector must be a string."
@@ -147,17 +147,17 @@ let SelectorContext = Class({
       type: "SelectorContext",
       args: [internal(this).selector]
     }
   }
 });
 exports.SelectorContext = SelectorContext;
 
 // Matches when the page url matches any of the patterns given
-let URLContext = Class({
+var URLContext = Class({
   extends: Context,
 
   initialize: function initialize(patterns) {
     Context.prototype.initialize.call(this);
     patterns = Array.isArray(patterns) ? patterns : [patterns];
 
     try {
       internal(this).patterns = patterns.map(function (p) new MatchPattern(p));
@@ -178,17 +178,17 @@ let URLContext = Class({
       type: "URLContext",
       args: []
     }
   }
 });
 exports.URLContext = URLContext;
 
 // Matches when the user-supplied predicate returns true
-let PredicateContext = Class({
+var PredicateContext = Class({
   extends: Context,
 
   initialize: function initialize(predicate) {
     Context.prototype.initialize.call(this);
     let options = validateOptions({ predicate: predicate }, {
       predicate: {
         is: ["function"],
         msg: "predicate must be a function."
@@ -214,17 +214,17 @@ exports.PredicateContext = PredicateCont
 function removeItemFromArray(array, item) {
   return array.filter(function(i) i !== item);
 }
 
 // Converts anything that isn't false, null or undefined into a string
 function stringOrNull(val) val ? String(val) : val;
 
 // Shared option validation rules for Item, Menu, and Separator
-let baseItemRules = {
+var baseItemRules = {
   parentMenu: {
     is: ["object", "undefined"],
     ok: function (v) {
       if (!v)
         return true;
       return (v instanceof ItemContainer) || (v instanceof Menu);
     },
     msg: "parentMenu must be a Menu or not specified."
@@ -242,17 +242,17 @@ let baseItemRules = {
   },
   onMessage: {
     is: ["function", "undefined"]
   },
   contentScript: loaderContract.rules.contentScript,
   contentScriptFile: loaderContract.rules.contentScriptFile
 };
 
-let labelledItemRules =  mix(baseItemRules, {
+var labelledItemRules =  mix(baseItemRules, {
   label: {
     map: stringOrNull,
     is: ["string"],
     ok: function (v) !!v,
     msg: "The item must have a non-empty string label."
   },
   accesskey: {
     map: stringOrNull,
@@ -273,25 +273,25 @@ let labelledItemRules =  mix(baseItemRul
         return true;
       return isValidURI(url);
     },
     msg: "Image URL validation failed"
   }
 });
 
 // Additional validation rules for Item
-let itemRules = mix(labelledItemRules, {
+var itemRules = mix(labelledItemRules, {
   data: {
     map: stringOrNull,
     is: ["string", "undefined", "null"]
   }
 });
 
 // Additional validation rules for Menu
-let menuRules = mix(labelledItemRules, {
+var menuRules = mix(labelledItemRules, {
   items: {
     is: ["array", "undefined"],
     ok: function (v) {
       if (!v)
         return true;
       return v.every(function (item) {
         return item instanceof BaseItem;
       });
@@ -355,17 +355,17 @@ function serializeItem(item) {
     id: internal(item).id,
     contexts: [c.serialize() for (c of item.context)],
     contentScript: item.contentScript,
     contentScriptFile: item.contentScriptFile,
   };
 }
 
 // All things that appear in the context menu extend this
-let BaseItem = Class({
+var BaseItem = Class({
   initialize: function initialize() {
     internal(this).id = uuid();
 
     internal(this).contexts = [];
     if ("context" in internal(this).options && internal(this).options.context) {
       let contexts = internal(this).options.context;
       if (Array.isArray(contexts)) {
         for (let context of contexts)
@@ -448,17 +448,17 @@ let BaseItem = Class({
 function workerMessageReceived(process, id, args) {
   if (internal(this).id != id)
     return;
 
   emit(this, ...JSON.parse(args));
 }
 
 // All things that have a label on the context menu extend this
-let LabelledItem = Class({
+var LabelledItem = Class({
   extends: BaseItem,
   implements: [ EventTarget ],
 
   initialize: function initialize(options) {
     BaseItem.prototype.initialize.call(this);
     EventTarget.prototype.initialize.call(this, options);
 
     internal(this).messageListener = workerMessageReceived.bind(this);
@@ -508,17 +508,17 @@ let LabelledItem = Class({
     return internal(this).options.data;
   },
 
   set data(val) {
     internal(this).options.data = val;
   }
 });
 
-let Item = Class({
+var Item = Class({
   extends: LabelledItem,
 
   initialize: function initialize(options) {
     internal(this).options = validateOptions(options, itemRules);
 
     LabelledItem.prototype.initialize.call(this, options);
   },
 
@@ -533,17 +533,17 @@ let Item = Class({
   set data(val) {
     internal(this).options.data = val;
 
     MenuManager.updateItem(this);
   },
 });
 exports.Item = Item;
 
-let ItemContainer = Class({
+var ItemContainer = Class({
   initialize: function initialize() {
     internal(this).children = [];
   },
 
   destroy: function destroy() {
     // Destroys the entire hierarchy
     for (let item of internal(this).children)
       item.destroy();
@@ -602,17 +602,17 @@ let ItemContainer = Class({
     for (let item of internal(this).children)
       this.removeItem(item);
 
     for (let item of val)
       this.addItem(item);
   },
 });
 
-let Menu = Class({
+var Menu = Class({
   extends: LabelledItem,
   implements: [ItemContainer],
 
   initialize: function initialize(options) {
     internal(this).options = validateOptions(options, menuRules);
 
     LabelledItem.prototype.initialize.call(this, options);
     ItemContainer.prototype.initialize.call(this);
@@ -629,33 +629,33 @@ let Menu = Class({
   },
 
   toString: function toString() {
     return "[object Menu \"" + this.label + "\"]";
   },
 });
 exports.Menu = Menu;
 
-let Separator = Class({
+var Separator = Class({
   extends: BaseItem,
 
   initialize: function initialize(options) {
     internal(this).options = validateOptions(options, baseItemRules);
 
     BaseItem.prototype.initialize.call(this);
   },
 
   toString: function toString() {
     return "[object Separator]";
   }
 });
 exports.Separator = Separator;
 
 // Holds items for the content area context menu
-let contentContextMenu = ItemContainer();
+var contentContextMenu = ItemContainer();
 exports.contentContextMenu = contentContextMenu;
 
 function getContainerItems(container) {
   let items = [];
   for (let item of internal(container).children) {
     items.push(serializeItem(item));
     if (item instanceof Menu)
       items = items.concat(getContainerItems(item));
@@ -686,17 +686,17 @@ when(function() {
 // menu and passing clicks etc. through to the items.
 
 function countVisibleItems(nodes) {
   return Array.reduce(nodes, function(sum, node) {
     return node.hidden ? sum : sum + 1;
   }, 0);
 }
 
-let MenuWrapper = Class({
+var MenuWrapper = Class({
   initialize: function initialize(winWrapper, items, contextMenu) {
     this.winWrapper = winWrapper;
     this.window = winWrapper.window;
     this.items = items;
     this.contextMenu = contextMenu;
     this.populated = false;
     this.menuMap = new Map();
 
@@ -1076,17 +1076,17 @@ let MenuWrapper = Class({
     }
     catch (e) {
       console.exception(e);
     }
   }
 });
 
 // This wraps every window that we've seen
-let WindowWrapper = Class({
+var WindowWrapper = Class({
   initialize: function initialize(window) {
     this.window = window;
     this.menus = [
       new MenuWrapper(this, contentContextMenu, window.document.getElementById("contentAreaContextMenu")),
     ];
   },
 
   destroy: function destroy() {
@@ -1103,17 +1103,17 @@ let WindowWrapper = Class({
       if (wrapper.items === root)
         return wrapper;
     }
 
     return null;
   }
 });
 
-let MenuManager = {
+var MenuManager = {
   windowMap: new Map(),
 
   get overflowThreshold() {
     let prefs = require("./preferences/service");
     return prefs.get(OVERFLOW_THRESH_PREF, OVERFLOW_THRESH_DEFAULT);
   },
 
   // When a new window is added start watching it for context menu shows
--- a/addon-sdk/source/lib/sdk/core/promise.js
+++ b/addon-sdk/source/lib/sdk/core/promise.js
@@ -17,17 +17,17 @@ getEnvironment.call(this, function ({ re
 
 const Promise = Cu.import(PROMISE_URI, {}).Promise;
 const { Debugging, defer, resolve, all, reject, race } = Promise;
 
 module.metadata = {
   'stability': 'unstable'
 };
 
-let promised = (function() {
+var promised = (function() {
   // Note: Define shortcuts and utility functions here in order to avoid
   // slower property accesses and unnecessary closure creations on each
   // call of this popular function.
 
   var call = Function.call;
   var concat = Array.prototype.concat;
 
   // Utility function that does following:
--- a/addon-sdk/source/lib/sdk/deprecated/api-utils.js
+++ b/addon-sdk/source/lib/sdk/deprecated/api-utils.js
@@ -123,17 +123,17 @@ exports.addIterator = function addIterat
     let index = keysOnly ? 0 : 1;
     while (true)
       yield keysVals ? keysValsIterator.next() : keysValsIterator.next()[index];
   };
 };
 
 // Similar to typeof, except arrays, null and regexps are identified by "array" and
 // "null" and "regexp", not "object".
-let getTypeOf = exports.getTypeOf = function getTypeOf(val) {
+var getTypeOf = exports.getTypeOf = function getTypeOf(val) {
   let typ = typeof(val);
   if (typ === "object") {
     if (!val)
       return "null";
     if (isArray(val))
       return "array";
     if (isRegExp(val))
       return "regexp";
@@ -153,33 +153,33 @@ function RequirementError(key, requireme
            "must be one of the following types: " + requirement.is.join(", ") :
            "is invalid.";
   }
 
   this.message = msg;
 }
 RequirementError.prototype = Object.create(Error.prototype);
 
-let string = { is: ['string', 'undefined', 'null'] };
+var string = { is: ['string', 'undefined', 'null'] };
 exports.string = string;
 
-let number = { is: ['number', 'undefined', 'null'] };
+var number = { is: ['number', 'undefined', 'null'] };
 exports.number = number;
 
-let boolean = { is: ['boolean', 'undefined', 'null'] };
+var boolean = { is: ['boolean', 'undefined', 'null'] };
 exports.boolean = boolean;
 
-let object = { is: ['object', 'undefined', 'null'] };
+var object = { is: ['object', 'undefined', 'null'] };
 exports.object = object;
 
-let array = { is: ['array', 'undefined', 'null'] };
+var array = { is: ['array', 'undefined', 'null'] };
 exports.array = array;
 
-let isTruthyType = type => !(type === 'undefined' || type === 'null');
-let findTypes = v => { while (!isArray(v) && v.is) v = v.is; return v };
+var isTruthyType = type => !(type === 'undefined' || type === 'null');
+var findTypes = v => { while (!isArray(v) && v.is) v = v.is; return v };
 
 function required(req) {
   let types = (findTypes(req) || VALID_TYPES).filter(isTruthyType);
 
   return merge({}, req, {is: types});
 }
 exports.required = required;
 
--- a/addon-sdk/source/lib/sdk/deprecated/sync-worker.js
+++ b/addon-sdk/source/lib/sdk/deprecated/sync-worker.js
@@ -31,17 +31,17 @@ const events = require('../system/events
 const { getInnerId } = require("../window/utils");
 const { WorkerSandbox } = require('../content/sandbox');
 const { isPrivate } = require('../private-browsing/utils');
 
 // A weak map of workers to hold private attributes that
 // should not be exposed
 const workers = new WeakMap();
 
-let modelFor = (worker) => workers.get(worker);
+var modelFor = (worker) => workers.get(worker);
 
 const ERR_DESTROYED =
   "Couldn't find the worker to receive this message. " +
   "The script may not be initialized yet, or may already have been unloaded.";
 
 const ERR_FROZEN = "The page is currently hidden and can no longer be used " +
                    "until it is visible again.";
 
--- a/addon-sdk/source/lib/sdk/deprecated/unit-test-finder.js
+++ b/addon-sdk/source/lib/sdk/deprecated/unit-test-finder.js
@@ -122,17 +122,17 @@ const makeFilters = function makeFilters
 
   return {
     fileFilter: () => true,
     testFilter: () => true
   };
 }
 exports.makeFilters = makeFilters;
 
-let loader = Loader(module);
+var loader = Loader(module);
 const NOT_TESTS = ['setup', 'teardown'];
 
 var TestFinder = exports.TestFinder = function TestFinder(options) {
   this.filter = options.filter;
   this.testInProcess = options.testInProcess === false ? false : true;
   this.testOutOfProcess = options.testOutOfProcess === true ? true : false;
 };
 
--- a/addon-sdk/source/lib/sdk/deprecated/unit-test.js
+++ b/addon-sdk/source/lib/sdk/deprecated/unit-test.js
@@ -28,18 +28,18 @@ const findAndRunTests = function findAnd
       tests: tests,
       stopOnError: options.stopOnError,
       onDone: options.onDone
     });
   });
 };
 exports.findAndRunTests = findAndRunTests;
 
-let runnerWindows = new WeakMap();
-let runnerTabs = new WeakMap();
+var runnerWindows = new WeakMap();
+var runnerTabs = new WeakMap();
 
 const TestRunner = function TestRunner(options) {
   options = options || {};
 
   // remember the id's for the open window and tab
   let window = getMostRecentBrowserWindow();
   runnerWindows.set(this, getInnerId(window));
   runnerTabs.set(this, getTabId(getSelectedTab(window)));
--- a/addon-sdk/source/lib/sdk/event/core.js
+++ b/addon-sdk/source/lib/sdk/event/core.js
@@ -42,17 +42,17 @@ function on(target, type, listener) {
 
   let listeners = observers(target, type);
   if (!~listeners.indexOf(listener))
     listeners.push(listener);
 }
 exports.on = on;
 
 
-let onceWeakMap = new WeakMap();
+var onceWeakMap = new WeakMap();
 
 
 /**
  * Registers an event `listener` that is called only the next time an event
  * of the specified `type` is emitted on the given event `target`.
  * @param {Object} target
  *    Event target object.
  * @param {String} type
--- a/addon-sdk/source/lib/sdk/event/dom.js
+++ b/addon-sdk/source/lib/sdk/event/dom.js
@@ -5,21 +5,21 @@
 "use strict";
 
 module.metadata = {
   "stability": "unstable"
 };
 
 const { Ci } = require("chrome");
 
-let { emit } = require("./core");
-let { when: unload } = require("../system/unload");
-let listeners = new Map();
+var { emit } = require("./core");
+var { when: unload } = require("../system/unload");
+var listeners = new Map();
 
-let getWindowFrom = x =>
+var getWindowFrom = x =>
                     x instanceof Ci.nsIDOMWindow ? x :
                     x instanceof Ci.nsIDOMDocument ? x.defaultView :
                     x instanceof Ci.nsIDOMNode ? x.ownerDocument.defaultView :
                     null;
 
 function removeFromListeners() {
   this.removeEventListener("DOMWindowClose", removeFromListeners);
   for (let cleaner of listeners.get(this))
--- a/addon-sdk/source/lib/sdk/event/utils.js
+++ b/addon-sdk/source/lib/sdk/event/utils.js
@@ -2,27 +2,27 @@
  * 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/. */
 "use strict";
 
 module.metadata = {
   "stability": "unstable"
 };
 
-let { emit, on, once, off, EVENT_TYPE_PATTERN } = require("./core");
+var { emit, on, once, off, EVENT_TYPE_PATTERN } = require("./core");
 
 // This module provides set of high order function for working with event
 // streams (streams in a NodeJS style that dispatch data, end and error
 // events).
 
 // Function takes a `target` object and returns set of implicit references
 // (non property references) it keeps. This basically allows defining
 // references between objects without storing the explicitly. See transform for
 // more details.
-let refs = (function() {
+var refs = (function() {
   let refSets = new WeakMap();
   return function refs(target) {
     if (!refSets.has(target)) refSets.set(target, new Set());
     return refSets.get(target);
   };
 })();
 
 function transform(input, f) {
--- a/addon-sdk/source/lib/sdk/frame/hidden-frame.js
+++ b/addon-sdk/source/lib/sdk/frame/hidden-frame.js
@@ -17,18 +17,18 @@ const { create: makeFrame } = require(".
 const { defer } = require("../core/promise");
 const { when: unload } = require("../system/unload");
 const { validateOptions, getTypeOf } = require("../deprecated/api-utils");
 const { window } = require("../addon/window");
 const { fromIterator } = require("../util/array");
 
 // This cache is used to access friend properties between functions
 // without exposing them on the public API.
-let cache = new Set();
-let elements = new WeakMap();
+var cache = new Set();
+var elements = new WeakMap();
 
 function contentLoaded(target) {
   var deferred = defer();
   target.addEventListener("DOMContentLoaded", function DOMContentLoaded(event) {
     // "DOMContentLoaded" events from nested frames propagate up to target,
     // ignore events unless it's DOMContentLoaded for the given target.
     if (event.target === target || event.target === target.contentDocument) {
       target.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
--- a/addon-sdk/source/lib/sdk/indexed-db.js
+++ b/addon-sdk/source/lib/sdk/indexed-db.js
@@ -7,39 +7,39 @@
 module.metadata = {
   "stability": "experimental"
 };
 
 const { Cc, Ci } = require("chrome");
 const { id } = require("./self");
 
 // placeholder, copied from bootstrap.js
-let sanitizeId = function(id){
+var sanitizeId = function(id){
   let uuidRe =
     /^\{([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\}$/;
 
   let domain = id.
     toLowerCase().
     replace(/@/g, "-at-").
     replace(/\./g, "-dot-").
     replace(uuidRe, "$1");
 
   return domain
 };
 
 const PSEUDOURI = "indexeddb://" + sanitizeId(id) // https://bugzilla.mozilla.org/show_bug.cgi?id=779197
 
 // Use XPCOM because `require("./url").URL` doesn't expose the raw uri object.
-let principaluri = Cc["@mozilla.org/network/io-service;1"].
+var principaluri = Cc["@mozilla.org/network/io-service;1"].
               getService(Ci.nsIIOService).
               newURI(PSEUDOURI, null, null);
 
-let ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
+var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]
             .getService(Ci.nsIScriptSecurityManager);
-let principal = ssm.createCodebasePrincipal(principaluri, {});
+var principal = ssm.createCodebasePrincipal(principaluri, {});
 
 function toArray(args) {
   return Array.prototype.slice.call(args);
 }
 
 function openInternal(args, forPrincipal, deleting) {
   if (forPrincipal) {
     args = toArray(args);
--- a/addon-sdk/source/lib/sdk/io/fs.js
+++ b/addon-sdk/source/lib/sdk/io/fs.js
@@ -67,21 +67,21 @@ function accessor() {
   let map = new WeakMap();
   return function(fd, value) {
     if (value === null) map.delete(fd);
     if (value !== undefined) map.set(fd, value);
     return map.get(fd);
   }
 }
 
-let nsIFile = accessor();
-let nsIFileInputStream = accessor();
-let nsIFileOutputStream = accessor();
-let nsIBinaryInputStream = accessor();
-let nsIBinaryOutputStream = accessor();
+var nsIFile = accessor();
+var nsIFileInputStream = accessor();
+var nsIFileOutputStream = accessor();
+var nsIBinaryInputStream = accessor();
+var nsIBinaryOutputStream = accessor();
 
 // Just a contstant object used to signal that all of the file
 // needs to be read.
 const ALL = new String("Read all of the file");
 
 function isWritable(mode) !!(mode & PR_WRONLY || mode & PR_RDWR)
 function isReadable(mode) !!(mode & PR_RDONLY || mode & PR_RDWR)
 
@@ -319,28 +319,28 @@ function renameSync(oldPath, newPath) {
   return source.moveTo(target.parent, target.leafName);
 };
 exports.renameSync = renameSync;
 
 /**
  * Asynchronous rename(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let rename = Async(renameSync);
+var rename = Async(renameSync);
 exports.rename = rename;
 
 /**
  * Test whether or not the given path exists by checking with the file system.
  */
 function existsSync(path) {
   return new nsILocalFile(path).exists();
 }
 exports.existsSync = existsSync;
 
-let exists = Async(existsSync);
+var exists = Async(existsSync);
 exports.exists = exists;
 
 /**
  * Synchronous ftruncate(2).
  */
 function truncateSync(path, length) {
   let fd = openSync(path, "w");
   ftruncateSync(fd, length);
@@ -380,25 +380,25 @@ function ftruncateSync(fd, length = 0) {
 }
 exports.ftruncateSync = ftruncateSync;
 
 function chownSync(path, uid, gid) {
   throw Error("Not implemented yet!!");
 }
 exports.chownSync = chownSync;
 
-let chown = Async(chownSync);
+var chown = Async(chownSync);
 exports.chown = chown;
 
 function lchownSync(path, uid, gid) {
   throw Error("Not implemented yet!!");
 }
 exports.lchownSync = chownSync;
 
-let lchown = Async(lchown);
+var lchown = Async(lchown);
 exports.lchown = lchown;
 
 /**
  * Synchronous chmod(2).
  */
 function chmodSync (path, mode) {
   let file;
   try {
@@ -409,165 +409,165 @@ function chmodSync (path, mode) {
 
   file.permissions = Mode(mode);
 }
 exports.chmodSync = chmodSync;
 /**
  * Asynchronous chmod(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let chmod = Async(chmodSync);
+var chmod = Async(chmodSync);
 exports.chmod = chmod;
 
 /**
  * Synchronous chmod(2).
  */
 function fchmodSync(fd, mode) {
   throw Error("Not implemented yet!!");
 };
 exports.fchmodSync = fchmodSync;
 /**
  * Asynchronous chmod(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let fchmod = Async(fchmodSync);
+var fchmod = Async(fchmodSync);
 exports.fchmod = fchmod;
 
 
 /**
  * Synchronous stat(2). Returns an instance of `fs.Stats`
  */
 function statSync(path) {
   return new Stats(path);
 };
 exports.statSync = statSync;
 
 /**
  * Asynchronous stat(2). The callback gets two arguments (err, stats) where
  * stats is a `fs.Stats` object. It looks like this:
  */
-let stat = Async(statSync);
+var stat = Async(statSync);
 exports.stat = stat;
 
 /**
  * Synchronous lstat(2). Returns an instance of `fs.Stats`.
  */
 function lstatSync(path) {
   return new LStats(path);
 };
 exports.lstatSync = lstatSync;
 
 /**
  * Asynchronous lstat(2). The callback gets two arguments (err, stats) where
  * stats is a fs.Stats object. lstat() is identical to stat(), except that if
  * path is a symbolic link, then the link itself is stat-ed, not the file that
  * it refers to.
  */
-let lstat = Async(lstatSync);
+var lstat = Async(lstatSync);
 exports.lstat = lstat;
 
 /**
  * Synchronous fstat(2). Returns an instance of `fs.Stats`.
  */
 function fstatSync(fd) {
   return new FStat(fd);
 };
 exports.fstatSync = fstatSync;
 
 /**
  * Asynchronous fstat(2). The callback gets two arguments (err, stats) where
  * stats is a fs.Stats object.
  */
-let fstat = Async(fstatSync);
+var fstat = Async(fstatSync);
 exports.fstat = fstat;
 
 /**
  * Synchronous link(2).
  */
 function linkSync(source, target) {
   throw Error("Not implemented yet!!");
 };
 exports.linkSync = linkSync;
 
 /**
  * Asynchronous link(2). No arguments other than a possible exception are given
  * to the completion callback.
  */
-let link = Async(linkSync);
+var link = Async(linkSync);
 exports.link = link;
 
 /**
  * Synchronous symlink(2).
  */
 function symlinkSync(source, target) {
   throw Error("Not implemented yet!!");
 };
 exports.symlinkSync = symlinkSync;
 
 /**
  * Asynchronous symlink(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let symlink = Async(symlinkSync);
+var symlink = Async(symlinkSync);
 exports.symlink = symlink;
 
 /**
  * Synchronous readlink(2). Returns the resolved path.
  */
 function readlinkSync(path) {
   return new nsILocalFile(path).target;
 };
 exports.readlinkSync = readlinkSync;
 
 /**
  * Asynchronous readlink(2). The callback gets two arguments
  * `(error, resolvedPath)`.
  */
-let readlink = Async(readlinkSync);
+var readlink = Async(readlinkSync);
 exports.readlink = readlink;
 
 /**
  * Synchronous realpath(2). Returns the resolved path.
  */
 function realpathSync(path) {
   return new nsILocalFile(path).path;
 };
 exports.realpathSync = realpathSync;
 
 /**
  * Asynchronous realpath(2). The callback gets two arguments
  * `(err, resolvedPath)`.
  */
-let realpath = Async(realpathSync);
+var realpath = Async(realpathSync);
 exports.realpath = realpath;
 
 /**
  * Synchronous unlink(2).
  */
-let unlinkSync = remove;
+var unlinkSync = remove;
 exports.unlinkSync = unlinkSync;
 
 /**
  * Asynchronous unlink(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let unlink = Async(remove);
+var unlink = Async(remove);
 exports.unlink = unlink;
 
 /**
  * Synchronous rmdir(2).
  */
-let rmdirSync = remove;
+var rmdirSync = remove;
 exports.rmdirSync = rmdirSync;
 
 /**
  * Asynchronous rmdir(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let rmdir = Async(rmdirSync);
+var rmdir = Async(rmdirSync);
 exports.rmdir = rmdir;
 
 /**
  * Synchronous mkdir(2).
  */
 function mkdirSync(path, mode) {
   try {
     return nsILocalFile(path).create(DIRECTORY_TYPE, Mode(mode));
@@ -581,17 +581,17 @@ function mkdirSync(path, mode) {
   }
 };
 exports.mkdirSync = mkdirSync;
 
 /**
  * Asynchronous mkdir(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let mkdir = Async(mkdirSync);
+var mkdir = Async(mkdirSync);
 exports.mkdir = mkdir;
 
 /**
  * Synchronous readdir(3). Returns an array of filenames excluding `"."` and
  * `".."`.
  */
 function readdirSync(path) {
   try {
@@ -610,17 +610,17 @@ function readdirSync(path) {
 };
 exports.readdirSync = readdirSync;
 
 /**
  * Asynchronous readdir(3). Reads the contents of a directory. The callback
  * gets two arguments `(error, files)` where `files` is an array of the names
  * of the files in the directory excluding `"."` and `".."`.
  */
-let readdir = Async(readdirSync);
+var readdir = Async(readdirSync);
 exports.readdir = readdir;
 
 /**
  * Synchronous close(2).
  */
  function closeSync(fd) {
    let input = nsIFileInputStream(fd);
    let output = nsIFileOutputStream(fd);
@@ -636,17 +636,17 @@ exports.readdir = readdir;
    nsIBinaryInputStream(fd, null);
    nsIBinaryOutputStream(fd, null);
 };
 exports.closeSync = closeSync;
 /**
  * Asynchronous close(2). No arguments other than a possible exception are
  * given to the completion callback.
  */
-let close = Async(closeSync);
+var close = Async(closeSync);
 exports.close = close;
 
 /**
  * Synchronous open(2).
  */
 function openSync(aPath, aFlag, aMode) {
   let [ fd, flags, mode, file ] =
       [ { path: aPath }, Flags(aFlag), Mode(aMode), nsILocalFile(aPath) ];
@@ -673,17 +673,17 @@ function openSync(aPath, aFlag, aMode) {
   return fd;
 }
 exports.openSync = openSync;
 /**
  * Asynchronous file open. See open(2). Flags can be
  * `"r", "r+", "w", "w+", "a"`, or `"a+"`. mode defaults to `0666`.
  * The callback gets two arguments `(error, fd).
  */
-let open = Async(openSync);
+var open = Async(openSync);
 exports.open = open;
 
 /**
  * Synchronous version of buffer-based fs.write(). Returns the number of bytes
  * written.
  */
 function writeSync(fd, buffer, offset, length, position) {
   if (length + offset > buffer.length) {
@@ -890,33 +890,33 @@ function writeFileSync(filename, data, e
 exports.writeFileSync = writeFileSync;
 
 
 function utimesSync(path, atime, mtime) {
   throw Error("Not implemented");
 }
 exports.utimesSync = utimesSync;
 
-let utimes = Async(utimesSync);
+var utimes = Async(utimesSync);
 exports.utimes = utimes;
 
 function futimesSync(fd, atime, mtime, callback) {
   throw Error("Not implemented");
 }
 exports.futimesSync = futimesSync;
 
-let futimes = Async(futimesSync);
+var futimes = Async(futimesSync);
 exports.futimes = futimes;
 
 function fsyncSync(fd, atime, mtime, callback) {
   throw Error("Not implemented");
 }
 exports.fsyncSync = fsyncSync;
 
-let fsync = Async(fsyncSync);
+var fsync = Async(fsyncSync);
 exports.fsync = fsync;
 
 
 /**
  * Watch for changes on filename. The callback listener will be called each
  * time the file is accessed.
  *
  * The second argument is optional. The options if provided should be an object
--- a/addon-sdk/source/lib/sdk/io/stream.js
+++ b/addon-sdk/source/lib/sdk/io/stream.js
@@ -30,17 +30,17 @@ const InputStreamPump = CC("@mozilla.org
                            "nsIInputStreamPump", "init");
 
 const threadManager = Cc["@mozilla.org/thread-manager;1"].
                       getService(Ci.nsIThreadManager);
 
 const eventTarget = Cc["@mozilla.org/network/stream-transport-service;1"].
                     getService(Ci.nsIEventTarget);
 
-let isFunction = value => typeof(value) === "function"
+var isFunction = value => typeof(value) === "function"
 
 function accessor() {
   let map = new WeakMap();
   return function(target, value) {
     if (value)
       map.set(target, value);
     return map.get(target);
   }
@@ -118,20 +118,20 @@ const Stream = Class({
   },
   destroySoon: function destroySoon() {
     this.destroy();
   }
 });
 exports.Stream = Stream;
 
 
-let nsIStreamListener = accessor();
-let nsIInputStreamPump = accessor();
-let nsIAsyncInputStream = accessor();
-let nsIBinaryInputStream = accessor();
+var nsIStreamListener = accessor();
+var nsIInputStreamPump = accessor();
+var nsIAsyncInputStream = accessor();
+var nsIBinaryInputStream = accessor();
 
 const StreamListener = Class({
   initialize: function(stream) {
     this.stream = stream;
   },
 
   // Next three methods are part of `nsIStreamListener` interface and are
   // invoked by `nsIInputStreamPump.asyncRead`.
@@ -211,20 +211,20 @@ const InputStream = Class({
     nsIBinaryInputStream(this);
     nsIStreamListener(this);
   }
 });
 exports.InputStream = InputStream;
 
 
 
-let nsIRequestObserver = accessor();
-let nsIAsyncOutputStream = accessor();
-let nsIAsyncStreamCopier = accessor();
-let nsIMultiplexInputStream = accessor();
+var nsIRequestObserver = accessor();
+var nsIAsyncOutputStream = accessor();
+var nsIAsyncStreamCopier = accessor();
+var nsIMultiplexInputStream = accessor();
 
 const RequestObserver = Class({
   initialize: function(stream) {
     this.stream = stream;
   },
   // Method is part of `nsIRequestObserver` interface that is
   // invoked by `nsIAsyncStreamCopier.asyncCopy`.
   onStartRequest: function() {},
--- a/addon-sdk/source/lib/sdk/l10n.js
+++ b/addon-sdk/source/lib/sdk/l10n.js
@@ -8,17 +8,17 @@ module.metadata = {
 };
 
 const json = require("./l10n/json/core");
 const { get: getKey } = require("./l10n/core");
 const properties = require("./l10n/properties/core");
 const { getRulesForLocale } = require("./l10n/plural-rules");
 
 // Retrieve the plural mapping function
-let pluralMappingFunction = getRulesForLocale(json.language()) ||
+var pluralMappingFunction = getRulesForLocale(json.language()) ||
                             getRulesForLocale("en");
 
 exports.get = function get(k) {
   // For now, we only accept a "string" as first argument
   // TODO: handle plural forms in gettext pattern
   if (typeof k !== "string")
     throw new Error("First argument of localization method should be a string");
   let n = arguments[1];
--- a/addon-sdk/source/lib/sdk/l10n/html.js
+++ b/addon-sdk/source/lib/sdk/l10n/html.js
@@ -5,17 +5,17 @@
 
 module.metadata = {
   "stability": "unstable"
 };
 
 const { processes, remoteRequire } = require("../remote/parent");
 remoteRequire("sdk/content/l10n-html");
 
-let enabled = false;
+var enabled = false;
 function enable() {
   if (!enabled) {
     processes.port.emit("sdk/l10n/html/enable");
     enabled = true;
   }
 }
 exports.enable = enable;
 
--- a/addon-sdk/source/lib/sdk/l10n/json/core.js
+++ b/addon-sdk/source/lib/sdk/l10n/json/core.js
@@ -2,18 +2,18 @@
  * 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/. */
  "use strict";
 
 module.metadata = {
   "stability": "unstable"
 };
 
-let usingJSON = false;
-let hash = {}, bestMatchingLocale = null;
+var usingJSON = false;
+var hash = {}, bestMatchingLocale = null;
 try {
   let data = require("@l10n/data");
   hash = data.hash;
   bestMatchingLocale = data.bestMatchingLocale;
   usingJSON = true;
 }
 catch(e) {}
 
--- a/addon-sdk/source/lib/sdk/lang/type.js
+++ b/addon-sdk/source/lib/sdk/lang/type.js
@@ -134,20 +134,20 @@ exports.isArray = isArray;
  *    (function(){ return isArguments(arguments); })(1, 2, 3); // true
  *    isArguments([1,2,3]); // false
  */
 function isArguments(value) {
   return Object.prototype.toString.call(value) === "[object Arguments]";
 }
 exports.isArguments = isArguments;
 
-let isMap = value => Object.prototype.toString.call(value) === "[object Map]"
+var isMap = value => Object.prototype.toString.call(value) === "[object Map]"
 exports.isMap = isMap;
 
-let isSet = value => Object.prototype.toString.call(value) === "[object Set]"
+var isSet = value => Object.prototype.toString.call(value) === "[object Set]"
 exports.isSet = isSet;
 
 /**
  * Returns true if it is a primitive `value`. (null, undefined, number,
  * boolean, string)
  * @examples
  *    isPrimitive(3) // true
  *    isPrimitive('foo') // true
--- a/addon-sdk/source/lib/sdk/lang/weak-set.js
+++ b/addon-sdk/source/lib/sdk/lang/weak-set.js
@@ -16,18 +16,18 @@ function makeGetterFor(Type) {
   return function getFor(target) {
     if (!cache.has(target))
       cache.set(target, new Type());
 
     return cache.get(target);
   }
 }
 
-let getLookupFor = makeGetterFor(WeakMap);
-let getRefsFor = makeGetterFor(Set);
+var getLookupFor = makeGetterFor(WeakMap);
+var getRefsFor = makeGetterFor(Set);
 
 function add(target, value) {
   if (has(target, value))
     return;
 
   getLookupFor(target).set(value, true);
   getRefsFor(target).add(Cu.getWeakReference(value));
 }
--- a/addon-sdk/source/lib/sdk/page-mod.js
+++ b/addon-sdk/source/lib/sdk/page-mod.js
@@ -20,23 +20,23 @@ const { merge, omit } = require('./util/
 const { remove, has, hasAny } = require("./util/array");
 const { Rules } = require("./util/rules");
 const { processes, frames, remoteRequire } = require('./remote/parent');
 remoteRequire('sdk/content/page-mod');
 
 const pagemods = new Map();
 const workers = new Map();
 const models = new WeakMap();
-let modelFor = (mod) => models.get(mod);
-let workerFor = (mod) => workers.get(mod)[0];
+var modelFor = (mod) => models.get(mod);
+var workerFor = (mod) => workers.get(mod)[0];
 
 // Helper functions
-let isRegExpOrString = (v) => isRegExp(v) || typeof v === 'string';
+var isRegExpOrString = (v) => isRegExp(v) || typeof v === 'string';
 
-let PAGEMOD_ID = 0;
+var PAGEMOD_ID = 0;
 
 // Validation Contracts
 const modOptions = {
   // contentStyle* / contentScript* are sharing the same validation constraints,
   // so they can be mostly reused, except for the messages.
   contentStyle: merge(Object.create(loaderContract.rules.contentScript), {
     msg: 'The `contentStyle` option must be a string or an array of strings.'
   }),
--- a/addon-sdk/source/lib/sdk/page-mod/match-pattern.js
+++ b/addon-sdk/source/lib/sdk/page-mod/match-pattern.js
@@ -1,10 +1,10 @@
 /* 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/. */
  "use strict";
 
-let { deprecateUsage } = require("../util/deprecate");
+var { deprecateUsage } = require("../util/deprecate");
 
 deprecateUsage("Module 'sdk/page-mod/match-pattern' is deprecated use 'sdk/util/match-pattern' instead");
 
 module.exports = require("../util/match-pattern");
--- a/addon-sdk/source/lib/sdk/page-worker.js
+++ b/addon-sdk/source/lib/sdk/page-worker.js
@@ -39,17 +39,17 @@ const readyEventNames = [
   'load'
 ];
 
 function workerFor(page) workers.get(page)
 function pageFor(view) pages.get(view)
 function viewFor(page) views.get(page)
 function isDisposed (page) !views.get(page, false)
 
-let pageContract = contract(merge({
+var pageContract = contract(merge({
   allow: {
     is: ['object', 'undefined', 'null'],
     map: function (allow) { return { script: !allow || allow.script !== false }}
   },
   onMessage: {
     is: ['function', 'undefined']
   },
   include: {
@@ -151,22 +151,22 @@ const Page = Class({
     views.delete(this);
     destroy(workers.get(this));
   },
   toString: function () { return '[object Page]' }
 });
 
 exports.Page = Page;
 
-let pageEvents = streamMerge([events, streamEventsFrom(window)]);
-let readyEvents = filter(pageEvents, isReadyEvent);
-let formattedEvents = map(readyEvents, function({target, type}) {
+var pageEvents = streamMerge([events, streamEventsFrom(window)]);
+var readyEvents = filter(pageEvents, isReadyEvent);
+var formattedEvents = map(readyEvents, function({target, type}) {
   return { type: type, page: pageFromDoc(target) };
 });
-let pageReadyEvents = filter(formattedEvents, function({page, type}) {
+var pageReadyEvents = filter(formattedEvents, function({page, type}) {
   return getAttachEventType(page) === type});
 on(pageReadyEvents, 'data', injectWorker);
 
 function isReadyEvent ({type}) {
   return has(readyEventNames, type);
 }
 
 /*
--- a/addon-sdk/source/lib/sdk/panel.js
+++ b/addon-sdk/source/lib/sdk/panel.js
@@ -31,74 +31,74 @@ const systemEvents = require("./system/e
 const { filter, pipe, stripListeners } = require("./event/utils");
 const { getNodeView, getActiveView } = require("./view/core");
 const { isNil, isObject, isNumber } = require("./lang/type");
 const { getAttachEventType } = require("./content/utils");
 const { number, boolean, object } = require('./deprecated/api-utils');
 const { Style } = require("./stylesheet/style");
 const { attach, detach } = require("./content/mod");
 
-let isRect = ({top, right, bottom, left}) => [top, right, bottom, left].
+var isRect = ({top, right, bottom, left}) => [top, right, bottom, left].
   some(value => isNumber(value) && !isNaN(value));
 
-let isSDKObj = obj => obj instanceof Class;
+var isSDKObj = obj => obj instanceof Class;
 
-let rectContract = contract({
+var rectContract = contract({
   top: number,
   right: number,
   bottom: number,
   left: number
 });
 
-let position = {
+var position = {
   is: object,
   map: v => (isNil(v) || isSDKObj(v) || !isObject(v)) ? v : rectContract(v),
   ok: v => isNil(v) || isSDKObj(v) || (isObject(v) && isRect(v)),
   msg: 'The option "position" must be a SDK object registered as anchor; ' +
         'or an object with one or more of the following keys set to numeric ' +
         'values: top, right, bottom, left.'
 }
 
-let displayContract = contract({
+var displayContract = contract({
   width: number,
   height: number,
   focus: boolean,
   position: position
 });
 
-let panelContract = contract(merge({
+var panelContract = contract(merge({
   // contentStyle* / contentScript* are sharing the same validation constraints,
   // so they can be mostly reused, except for the messages.
   contentStyle: merge(Object.create(loaderContract.rules.contentScript), {
     msg: 'The `contentStyle` option must be a string or an array of strings.'
   }),
   contentStyleFile: merge(Object.create(loaderContract.rules.contentScriptFile), {
     msg: 'The `contentStyleFile` option must be a local URL or an array of URLs'
   }),
   contextMenu: boolean
 }, displayContract.rules, loaderContract.rules));
 
 
 function isDisposed(panel) !views.has(panel);
 
-let panels = new WeakMap();
-let models = new WeakMap();
-let views = new WeakMap();
-let workers = new WeakMap();
-let styles = new WeakMap();
+var panels = new WeakMap();
+var models = new WeakMap();
+var views = new WeakMap();
+var workers = new WeakMap();
+var styles = new WeakMap();
 
 const viewFor = (panel) => views.get(panel);
 const modelFor = (panel) => models.get(panel);
 const panelFor = (view) => panels.get(view);
 const workerFor = (panel) => workers.get(panel);
 const styleFor = (panel) => styles.get(panel);
 
 // Utility function takes `panel` instance and makes sure it will be
 // automatically hidden as soon as other panel is shown.
-let setupAutoHide = new function() {
+var setupAutoHide = new function() {
   let refs = new WeakMap();
 
   return function setupAutoHide(panel) {
     // Create system event listener that reacts to any panel showing and
     // hides given `panel` if it's not the one being shown.
     function listener({subject}) {
       // It could be that listener is not GC-ed in the same cycle as
       // panel in such case we remove listener manually.
@@ -275,37 +275,37 @@ const Panel = Class({
   }
 });
 exports.Panel = Panel;
 
 // Note must be defined only after value to `Panel` is assigned.
 getActiveView.define(Panel, viewFor);
 
 // Filter panel events to only panels that are create by this module.
-let panelEvents = filter(events, ({target}) => panelFor(target));
+var panelEvents = filter(events, ({target}) => panelFor(target));
 
 // Panel events emitted after panel has being shown.
-let shows = filter(panelEvents, ({type}) => type === "popupshown");
+var shows = filter(panelEvents, ({type}) => type === "popupshown");
 
 // Panel events emitted after panel became hidden.
-let hides = filter(panelEvents, ({type}) => type === "popuphidden");
+var hides = filter(panelEvents, ({type}) => type === "popuphidden");
 
 // Panel events emitted after content inside panel is ready. For different
 // panels ready may mean different state based on `contentScriptWhen` attribute.
 // Weather given event represents readyness is detected by `getAttachEventType`
 // helper function.
-let ready = filter(panelEvents, ({type, target}) =>
+var ready = filter(panelEvents, ({type, target}) =>
   getAttachEventType(modelFor(panelFor(target))) === type);
 
 // Panel event emitted when the contents of the panel has been loaded.
-let readyToShow = filter(panelEvents, ({type}) => type === "DOMContentLoaded");
+var readyToShow = filter(panelEvents, ({type}) => type === "DOMContentLoaded");
 
 // Styles should be always added as soon as possible, and doesn't makes them
 // depends on `contentScriptWhen`
-let start = filter(panelEvents, ({type}) => type === "document-element-inserted");
+var start = filter(panelEvents, ({type}) => type === "document-element-inserted");
 
 // Forward panel show / hide events to panel's own event listeners.
 on(shows, "data", ({target}) => {
   let panel = panelFor(target);
   if (modelFor(panel).ready)
     emit(panel, "show");
 });
 
--- a/addon-sdk/source/lib/sdk/panel/events.js
+++ b/addon-sdk/source/lib/sdk/panel/events.js
@@ -9,17 +9,17 @@
 
 module.metadata = {
   "stability": "experimental"
 };
 
 const events = require("../system/events");
 const { emit } = require("../event/core");
 
-let channel = {};
+var channel = {};
 
 function forward({ subject, type, data })
   emit(channel, "data", { target: subject, type: type, data: data });
 
 ["popupshowing", "popuphiding", "popupshown", "popuphidden",
 "document-element-inserted", "DOMContentLoaded", "load"
 ].forEach(function(type) events.on(type, forward));
 
--- a/addon-sdk/source/lib/sdk/panel/utils.js
+++ b/addon-sdk/source/lib/sdk/panel/utils.js
@@ -406,17 +406,17 @@ function style(panel) {
   }
   catch (error) {
     console.error("Unable to apply panel style");
     console.exception(error);
   }
 }
 exports.style = style;
 
-let getContentFrame = panel =>
+var getContentFrame = panel =>
     (isOpen(panel) || isOpening(panel)) ?
     panel.firstChild :
     panel.backgroundFrame
 exports.getContentFrame = getContentFrame;
 
 function getContentDocument(panel) getContentFrame(panel).contentDocument
 exports.getContentDocument = getContentDocument;
 
--- a/addon-sdk/source/lib/sdk/places/bookmarks.js
+++ b/addon-sdk/source/lib/sdk/places/bookmarks.js
@@ -370,26 +370,26 @@ function getId (item) {
     item ? item.id || itemMap.get(item) :
     null;
 }
 
 /*
  * Set up the default, root groups
  */
 
-let defaultGroupMap = {
+var defaultGroupMap = {
   MENU: bmsrv.bookmarksMenuFolder,
   TOOLBAR: bmsrv.toolbarFolder,
   UNSORTED: bmsrv.unfiledBookmarksFolder
 };
 
-let rootGroups = new Map();
+var rootGroups = new Map();
 
 for (let i in defaultGroupMap) {
   let group = Object.freeze(Group({ title: i, id: defaultGroupMap[i] }));
   rootGroups.set(defaultGroupMap[i], group);
   exports[i] = group;
 }
 
-let defaults = {
+var defaults = {
   group: exports.UNSORTED,
   index: -1
 };
--- a/addon-sdk/source/lib/sdk/places/events.js
+++ b/addon-sdk/source/lib/sdk/places/events.js
@@ -22,56 +22,56 @@ const historyService = Cc['@mozilla.org/
                        .getService(Ci.nsINavHistoryService);
 const { mapBookmarkItemType } = require('./utils');
 const { EventTarget } = require('../event/target');
 const { emit } = require('../event/core');
 const { when } = require('../system/unload');
 
 const emitter = EventTarget();
 
-let HISTORY_ARGS = {
+var HISTORY_ARGS = {
   onBeginUpdateBatch: [],
   onEndUpdateBatch: [],
   onClearHistory: [],
   onDeleteURI: ['url'],
   onDeleteVisits: ['url', 'visitTime'],
   onPageChanged: ['url', 'property', 'value'],
   onTitleChanged: ['url', 'title'],
   onVisit: [
     'url', 'visitId', 'time', 'sessionId', 'referringId', 'transitionType'
   ]
 };
 
-let HISTORY_EVENTS = {
+var HISTORY_EVENTS = {
   onBeginUpdateBatch: 'history-start-batch',
   onEndUpdateBatch: 'history-end-batch',
   onClearHistory: 'history-start-clear',
   onDeleteURI: 'history-delete-url',
   onDeleteVisits: 'history-delete-visits',
   onPageChanged: 'history-page-changed',
   onTitleChanged: 'history-title-changed',
   onVisit: 'history-visit'
 };
 
-let BOOKMARK_ARGS = {
+var BOOKMARK_ARGS = {
   onItemAdded: [
     'id', 'parentId', 'index', 'type', 'url', 'title', 'dateAdded'
   ],
   onItemChanged: [
     'id', 'property', null, 'value', 'lastModified', 'type', 'parentId'
   ],
   onItemMoved: [
     'id', 'previousParentId', 'previousIndex', 'currentParentId',
     'currentIndex', 'type'
   ],
   onItemRemoved: ['id', 'parentId', 'index', 'type', 'url'],
   onItemVisited: ['id', 'visitId', 'time', 'transitionType', 'url', 'parentId']
 };
 
-let BOOKMARK_EVENTS = {
+var BOOKMARK_EVENTS = {
   onItemAdded: 'bookmark-item-added',
   onItemChanged: 'bookmark-item-changed',
   onItemMoved: 'bookmark-item-moved',
   onItemRemoved: 'bookmark-item-removed',
   onItemVisited: 'bookmark-item-visited',
 };
 
 function createHandler (type, propNames) {
@@ -109,20 +109,20 @@ function createObserverInstance (events,
 function formatValue (type, data) {
   if (type === 'type')
     return mapBookmarkItemType(data);
   if (type === 'url' && data)
     return data.spec;
   return data;
 }
 
-let historyObserver = createObserverInstance(HISTORY_EVENTS, HISTORY_ARGS);
+var historyObserver = createObserverInstance(HISTORY_EVENTS, HISTORY_ARGS);
 historyService.addObserver(historyObserver, false);
 
-let bookmarkObserver = createObserverInstance(BOOKMARK_EVENTS, BOOKMARK_ARGS);
+var bookmarkObserver = createObserverInstance(BOOKMARK_EVENTS, BOOKMARK_ARGS);
 bookmarkService.addObserver(bookmarkObserver, false);
 
 when(() => {
   historyService.removeObserver(historyObserver);
   bookmarkService.removeObserver(bookmarkObserver);
 });
 
 exports.events = emitter;
--- a/addon-sdk/source/lib/sdk/places/history.js
+++ b/addon-sdk/source/lib/sdk/places/history.js
@@ -34,17 +34,17 @@ const {
 } = require('./utils');
 
 /*
  * Constant used by nsIHistoryQuery; 0 is a history query
  * https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsINavHistoryQueryOptions
  */
 const HISTORY_QUERY = 0;
 
-let search = function query (queries, options) {
+var search = function query (queries, options) {
   queries = [].concat(queries);
   let emitter = EventTarget();
   let queryObjs = queries.map(createQuery.bind(null, HISTORY_QUERY));
   let optionsObj = createQueryOptions(HISTORY_QUERY, options);
 
   // Can remove after `Promise.jsm` is implemented in Bug 881047,
   // which will guarantee next tick execution
   async(() => {
--- a/addon-sdk/source/lib/sdk/places/host/host-bookmarks.js
+++ b/addon-sdk/source/lib/sdk/places/host/host-bookmarks.js
@@ -195,17 +195,17 @@ function getChildren ({ id }) {
   return all(ids.map(id => getBookmarkItem({ id: id })));
 }
 exports.getChildren = getChildren;
 
 /*
  * Hook into host
  */
 
-let reqStream = filter(request, (data) => /sdk-places-bookmarks/.test(data.event));
+var reqStream = filter(request, (data) => /sdk-places-bookmarks/.test(data.event));
 on(reqStream, 'data', ({ event, id, data }) => {
   if (!EVENT_MAP[event]) return;
 
   let resData = { id: id, event: event };
 
   promised(EVENT_MAP[event])(data).
   then(res => resData.data = res, e => resData.error = e).
   then(() => emit(response, 'data', resData));
--- a/addon-sdk/source/lib/sdk/places/host/host-query.js
+++ b/addon-sdk/source/lib/sdk/places/host/host-query.js
@@ -150,16 +150,16 @@ function normalize (historyObj) {
     return obj;
   }, {});
 }
 
 /*
  * Hook into host
  */
 
-let reqStream = filter(request, function (data) /sdk-places-query/.test(data.event));
+var reqStream = filter(request, function (data) /sdk-places-query/.test(data.event));
 on(reqStream, 'data', function (e) {
   if (EVENT_MAP[e.event]) EVENT_MAP[e.event](e);
 });
 
 function respond (data) {
   emit(response, 'data', data);
 }
--- a/addon-sdk/source/lib/sdk/places/host/host-tags.js
+++ b/addon-sdk/source/lib/sdk/places/host/host-tags.js
@@ -74,17 +74,17 @@ function getTagsByURL (message) {
   resData.data = taggingService.getTagsForURI(newURI(data.url), {});
   respond(resData);
 }
 
 /*
  * Hook into host
  */
 
-let reqStream = filter(request, function (data) {
+var reqStream = filter(request, function (data) {
   return /sdk-places-tags/.test(data.event);
 });
 
 on(reqStream, 'data', function (e) {
   if (EVENT_MAP[e.event]) EVENT_MAP[e.event](e);
 });
 
 function respond (data) {
--- a/addon-sdk/source/lib/sdk/places/utils.js
+++ b/addon-sdk/source/lib/sdk/places/utils.js
@@ -21,17 +21,17 @@ const { EventTarget } = require('../even
 const { merge } = require('../util/object');
 const bmsrv = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
                 getService(Ci.nsINavBookmarksService);
 
 /*
  * TreeNodes are used to construct dependency trees
  * for BookmarkItems
  */
-let TreeNode = Class({
+var TreeNode = Class({
   initialize: function (value) {
     this.value = value;
     this.children = [];
   },
   add: function (values) {
     [].concat(values).forEach(value => {
       this.children.push(value instanceof TreeNode ? value : TreeNode(value));
     });
--- a/addon-sdk/source/lib/sdk/private-browsing/utils.js
+++ b/addon-sdk/source/lib/sdk/private-browsing/utils.js
@@ -8,45 +8,45 @@ module.metadata = {
 };
 
 const { Cc, Ci, Cu } = require('chrome');
 const { is } = require('../system/xul-app');
 const { isWindowPrivate } = require('../window/utils');
 const { isPrivateBrowsingSupported } = require('../self');
 const { dispatcher } = require("../util/dispatcher");
 
-let PrivateBrowsingUtils;
+var PrivateBrowsingUtils;
 
 // Private browsing is only supported in Fx
 try {
   PrivateBrowsingUtils = Cu.import('resource://gre/modules/PrivateBrowsingUtils.jsm', {}).PrivateBrowsingUtils;
 }
 catch (e) {}
 
 exports.isGlobalPBSupported = false;
 
 // checks that per-window private browsing is implemented
-let isWindowPBSupported = exports.isWindowPBSupported =
+var isWindowPBSupported = exports.isWindowPBSupported =
                           !!PrivateBrowsingUtils && is('Firefox');
 
 // checks that per-tab private browsing is implemented
-let isTabPBSupported = exports.isTabPBSupported =
+var isTabPBSupported = exports.isTabPBSupported =
                        !!PrivateBrowsingUtils && is('Fennec');
 
 function isPermanentPrivateBrowsing() {
  return !!(PrivateBrowsingUtils && PrivateBrowsingUtils.permanentPrivateBrowsing);
 }
 exports.isPermanentPrivateBrowsing = isPermanentPrivateBrowsing;
 
 function ignoreWindow(window) {
   return !isPrivateBrowsingSupported && isWindowPrivate(window);
 }
 exports.ignoreWindow = ignoreWindow;
 
-let getMode = function getMode(chromeWin) {
+var getMode = function getMode(chromeWin) {
   return (chromeWin !== undefined && isWindowPrivate(chromeWin));
 };
 exports.getMode = getMode;
 
 const isPrivate = dispatcher("isPrivate");
 isPrivate.when(isPermanentPrivateBrowsing, _ => true);
 isPrivate.when(x => x instanceof Ci.nsIDOMWindow, isWindowPrivate);
 isPrivate.when(x => Ci.nsIPrivateBrowsingChannel && x instanceof Ci.nsIPrivateBrowsingChannel, x => x.isChannelPrivate);
--- a/addon-sdk/source/lib/sdk/querystring.js
+++ b/addon-sdk/source/lib/sdk/querystring.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
 module.metadata = {
   "stability": "unstable"
 };
 
-let unescape = decodeURIComponent;
+var unescape = decodeURIComponent;
 exports.unescape = unescape;
 
 // encodes a string safely for application/x-www-form-urlencoded
 // adheres to RFC 3986
 // see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent
 function escape(query) {
   return encodeURIComponent(query).
     replace(/%20/g, '+').
--- a/addon-sdk/source/lib/sdk/remote/child.js
+++ b/addon-sdk/source/lib/sdk/remote/child.js
@@ -103,18 +103,18 @@ function getListenerFromArray(array, lis
 function arrayContainsListener(array, listener) {
   return !!getListenerFromArray(array, listener);
 }
 
 function makeFrameEventListener(frame, callback) {
   return callback.bind(frame);
 }
 
-let FRAME_ID = 0;
-let tabMap = new Map();
+var FRAME_ID = 0;
+var tabMap = new Map();
 
 function frameMessageReceived({ data }) {
   if (data.loaderID != loaderID)
     return;
   let [event, ...args] = data.args;
   emit(this.port, event, this, ...args);
 }
 
@@ -252,17 +252,17 @@ const FrameList = Class({
     if (!arrayContainsListener(ns(this).domListeners, listener))
       return;
 
     removeListenerFromArray(ns(this).domListeners, listener);
     for (let frame of this)
       frame.removeEventListener(...listener.args);
   }
 });
-let frames = exports.frames = new FrameList();
+var frames = exports.frames = new FrameList();
 
 function registerContentFrame(contentFrame) {
   let frame = new Frame(contentFrame);
 }
 exports.registerContentFrame = registerContentFrame;
 
 function unregisterContentFrame(contentFrame) {
   let frame = tabMap.get(contentFrame.docShell);
--- a/addon-sdk/source/lib/sdk/remote/parent.js
+++ b/addon-sdk/source/lib/sdk/remote/parent.js
@@ -25,31 +25,31 @@ const { EventTarget } = require('../even
 const { emit } = require('../event/core');
 const system = require('../system/events');
 const { EventParent } = require('./utils');
 const options = require('@loader/options');
 const loaderModule = require('toolkit/loader');
 const { getTabForBrowser } = require('../tabs/utils');
 
 // Chose the right function for resolving relative a module id
-let moduleResolve;
+var moduleResolve;
 if (options.isNative) {
   moduleResolve = (id, requirer) => loaderModule.nodeResolve(id, requirer, { rootURI: options.rootURI });
 }
 else {
   moduleResolve = loaderModule.resolve;
 }
 // Build the sorted path mapping structure that resolveURI requires
-let pathMapping = Object.keys(options.paths)
+var pathMapping = Object.keys(options.paths)
                         .sort((a, b) => b.length - a.length)
                         .map(p => [p, options.paths[p]]);
 
 // Load the scripts in the child processes
-let { getNewLoaderID } = require('../../framescript/FrameScriptManager.jsm');
-let PATH = options.paths[''];
+var { getNewLoaderID } = require('../../framescript/FrameScriptManager.jsm');
+var PATH = options.paths[''];
 
 const childOptions = omit(options, ['modules', 'globals', 'resolve', 'load']);
 childOptions.modules = {};
 // @l10n/data is just JSON data and can be safely sent across to the child loader
 try {
   childOptions.modules["@l10n/data"] = require("@l10n/data");
 }
 catch (e) {
@@ -61,17 +61,17 @@ childOptions.childLoader = true;
 
 const ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1'].
              getService(Ci.nsIMessageBroadcaster);
 const gmm = Cc['@mozilla.org/globalmessagemanager;1'].
             getService(Ci.nsIMessageBroadcaster);
 
 const ns = Namespace();
 
-let processMap = new Map();
+var processMap = new Map();
 
 function processMessageReceived({ target, data }) {
   if (data.loaderID != loaderID)
     return;
   let [event, ...args] = data.args;
   emit(this.port, event, this, ...args);
 }
 
@@ -136,19 +136,19 @@ const Processes = Class({
       });
     };
   },
 
   getById: function(id) {
     return processMap.get(id);
   }
 });
-let processes = exports.processes = new Processes();
+var processes = exports.processes = new Processes();
 
-let frameMap = new Map();
+var frameMap = new Map();
 
 function frameMessageReceived({ target, data }) {
   if (data.loaderID != loaderID)
     return;
   let [event, ...args] = data.args;
   emit(this.port, event, this, ...args);
 }
 
@@ -236,17 +236,17 @@ const FrameList = Class({
   getFrameForBrowser: function(browser) {
     for (let frame of this) {
       if (frame.frameElement == browser)
         return frame;
     }
     return null;
   },
 });
-let frames = exports.frames = new FrameList();
+var frames = exports.frames = new FrameList();
 
 // Create the module loader in any existing processes
 ppmm.broadcastAsyncMessage('sdk/remote/process/load', {
   modulePath: PATH,
   loaderID,
   options: childOptions,
   reason: "broadcast"
 });
@@ -279,17 +279,17 @@ function processStarted({ target, data: 
   target.sendAsyncMessage('sdk/remote/process/load', {
     modulePath,
     loaderID,
     options: childOptions,
     reason: "response"
   });
 }
 
-let pendingFrames = new Map();
+var pendingFrames = new Map();
 
 // A new frame has been created in the remote process
 function frameAttached({ target, data }) {
   if (data.loaderID != loaderID)
     return;
 
   let frame = new Frame(data.frameID, target);
 
@@ -316,17 +316,17 @@ gmm.addMessageListener('sdk/remote/frame
 when(reason => {
   ppmm.removeMessageListener('sdk/remote/process/attach', processLoaderStarted);
   ppmm.removeMessageListener('sdk/remote/process/start', processStarted);
   gmm.removeMessageListener('sdk/remote/frame/attach', frameAttached);
 
   ppmm.broadcastAsyncMessage('sdk/remote/process/unload', { loaderID, reason });
 });
 
-let remoteModules = new Set();
+var remoteModules = new Set();
 
 // Ensures a module is loaded in every child process. It is safe to send 
 // messages to this module immediately after calling this.
 // Pass a module to resolve the id relatively.
 function remoteRequire(id, module = null) {
   // Resolve relative to calling module if passed
   if (module)
     id = moduleResolve(id, module.id);
--- a/addon-sdk/source/lib/sdk/self.js
+++ b/addon-sdk/source/lib/sdk/self.js
@@ -28,17 +28,17 @@ const permissions = metadata.permissions
 const isPacked = rootURI && rootURI.indexOf("jar:") === 0;
 
 const isPrivateBrowsingSupported = 'private-browsing' in permissions &&
                                    permissions['private-browsing'] === true;
 
 const uri = (path="") =>
   path.includes(":") ? path : addonDataURI + path.replace(/^\.\//, "");
 
-let preferencesBranch = ("preferences-branch" in metadata)
+var preferencesBranch = ("preferences-branch" in metadata)
                             ? metadata["preferences-branch"]
                             : options.preferencesBranch
 
 if (/[^\w{@}.-]/.test(preferencesBranch)) {
   preferencesBranch = id;
   console.warn("Ignoring preferences-branch (not a valid branch name)");
 }
 
--- a/addon-sdk/source/lib/sdk/simple-storage.js
+++ b/addon-sdk/source/lib/sdk/simple-storage.js
@@ -175,17 +175,17 @@ JsonStore.prototype = {
     }
   }
 };
 
 
 // This manages a JsonStore singleton and tailors its use to simple storage.
 // The root of the JsonStore is lazy-loaded:  The backing file is only read the
 // first time the root's gotten.
-let manager = ({
+var manager = ({
   jsonStore: null,
 
   // The filename of the store, based on the profile dir and extension ID.
   get filename() {
     let storeFile = Cc["@mozilla.org/file/directory_service;1"].
                     getService(Ci.nsIProperties).
                     get("ProfD", Ci.nsIFile);
     storeFile.append(JETPACK_DIR_BASENAME);
--- a/addon-sdk/source/lib/sdk/system.js
+++ b/addon-sdk/source/lib/sdk/system.js
@@ -47,17 +47,17 @@ exports.staticArgs = options.staticArgs;
  */
 exports.env = require('./system/environment').env;
 
 /**
  * Ends the process with the specified `code`. If omitted, exit uses the
  * 'success' code 0. To exit with failure use `1`.
  * TODO: Improve platform to actually quit with an exit code.
  */
-let forcedExit = false;
+var forcedExit = false;
 exports.exit = function exit(code) {
   if (forcedExit) {
     // a forced exit was already tried
     // NOTE: exit(0) is called twice sometimes (ex when using cfx testaddons)
     return;
   }
 
   let resultsFile = 'resultFile' in options && options.resultFile;
@@ -86,17 +86,17 @@ exports.exit = function exit(code) {
   }
 
   unloader();
   appStartup.quit(code ? E_ATTEMPT : E_FORCE);
 };
 
 // Adapter for nodejs's stdout & stderr:
 // http://nodejs.org/api/process.html#process_process_stdout
-let stdout = Object.freeze({ write: dump, end: dump });
+var stdout = Object.freeze({ write: dump, end: dump });
 exports.stdout = stdout;
 exports.stderr = stdout;
 
 /**
  * Returns a path of the system's or application's special directory / file
  * associated with a given `id`. For list of possible `id`s please see:
  * https://developer.mozilla.org/en-US/docs/Code_snippets/File_I_O#Getting_files_in_special_directories
  * http://mxr.mozilla.org/mozilla-central/source/xpcom/io/nsAppDirectoryServiceDefs.h
--- a/addon-sdk/source/lib/sdk/system/child_process.js
+++ b/addon-sdk/source/lib/sdk/system/child_process.js
@@ -2,37 +2,37 @@
  * 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/. */
 'use strict';
 
 module.metadata = {
   'stability': 'experimental'
 };
 
-let { Ci } = require('chrome');
-let subprocess = require('./child_process/subprocess');
-let { EventTarget } = require('../event/target');
-let { Stream } = require('../io/stream');
-let { on, emit, off } = require('../event/core');
-let { Class } = require('../core/heritage');
-let { platform } = require('../system');
-let { isFunction, isArray } = require('../lang/type');
-let { delay } = require('../lang/functional');
-let { merge } = require('../util/object');
-let { setTimeout, clearTimeout } = require('../timers');
-let isWindows = platform.indexOf('win') === 0;
+var { Ci } = require('chrome');
+var subprocess = require('./child_process/subprocess');
+var { EventTarget } = require('../event/target');
+var { Stream } = require('../io/stream');
+var { on, emit, off } = require('../event/core');
+var { Class } = require('../core/heritage');
+var { platform } = require('../system');
+var { isFunction, isArray } = require('../lang/type');
+var { delay } = require('../lang/functional');
+var { merge } = require('../util/object');
+var { setTimeout, clearTimeout } = require('../timers');
+var isWindows = platform.indexOf('win') === 0;
 
-let processes = new WeakMap();
+var processes = new WeakMap();
 
 
 /**
  * The `Child` class wraps a subprocess command, exposes
  * the stdio streams, and methods to manipulate the subprocess
  */
-let Child = Class({
+var Child = Class({
   implements: [EventTarget],
   initialize: function initialize (options) {
     let child = this;
     let proc;
 
     this.killed = false;
     this.exitCode = undefined;
     this.signalCode = undefined;
--- a/addon-sdk/source/lib/sdk/system/events.js
+++ b/addon-sdk/source/lib/sdk/system/events.js
@@ -126,20 +126,20 @@ function off(type, listener) {
     delete observers[type];
     removeObserver(observer, type);
     stillAlive.delete(weakRefs.get(observer));
   }
 }
 exports.off = off;
 
 // must use WeakMap to keep reference to all the WeakRefs (!), see bug 986115
-let weakRefs = new WeakMap();
+var weakRefs = new WeakMap();
 
 // and we're out of beta, we're releasing on time!
-let stillAlive = new Map();   
+var stillAlive = new Map();   
 
 on('sdk:loader:destroy', function onunload({ subject, data: reason }) {
   // using logic from ./unload, to avoid a circular module reference
   if (subject.wrappedJSObject === unloadSubject) {
     off('sdk:loader:destroy', onunload);
 
     // don't bother
     if (reason === 'shutdown') 
--- a/addon-sdk/source/lib/sdk/system/globals.js
+++ b/addon-sdk/source/lib/sdk/system/globals.js
@@ -3,21 +3,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 module.metadata = {
   "stability": "unstable"
 };
 
-let { Cc, Ci, CC } = require('chrome');
-let { PlainTextConsole } = require('../console/plain-text');
-let { stdout } = require('../system');
-let ScriptError = CC('@mozilla.org/scripterror;1', 'nsIScriptError');
-let consoleService = Cc['@mozilla.org/consoleservice;1'].getService(Ci.nsIConsoleService);
+var { Cc, Ci, CC } = require('chrome');
+var { PlainTextConsole } = require('../console/plain-text');
+var { stdout } = require('../system');
+var ScriptError = CC('@mozilla.org/scripterror;1', 'nsIScriptError');
+var consoleService = Cc['@mozilla.org/consoleservice;1'].getService(Ci.nsIConsoleService);
 
 // On windows dump does not writes into stdout so cfx can't read thous dumps.
 // To workaround this issue we write to a special file from which cfx will
 // read and print to the console.
 // For more details see: bug-673383
 exports.dump = stdout.write;
 
 exports.console = new PlainTextConsole();
--- a/addon-sdk/source/lib/sdk/tab/events.js
+++ b/addon-sdk/source/lib/sdk/tab/events.js
@@ -35,35 +35,35 @@ function tabEventsFor(window) {
   // Map supported event types to a streams of those events on the given
   // `window` and than merge these streams into single form stream off
   // all events.
   let channels = TYPES.map(function(type) open(window, type));
   return merge(channels);
 }
 
 // Filter DOMContentLoaded events from all the browser events.
-let readyEvents = filter(events, function(e) e.type === "DOMContentLoaded");
+var readyEvents = filter(events, function(e) e.type === "DOMContentLoaded");
 // Map DOMContentLoaded events to it's target browser windows.
-let futureWindows = map(readyEvents, function(e) e.target);
+var futureWindows = map(readyEvents, function(e) e.target);
 // Expand all browsers that will become interactive to supported tab events
 // on these windows. Result will be a tab events from all tabs of all windows
 // that will become interactive.
-let eventsFromFuture = expand(futureWindows, tabEventsFor);
+var eventsFromFuture = expand(futureWindows, tabEventsFor);
 
 // Above covers only windows that will become interactive in a future, but some
 // windows may already be interactive so we pick those and expand to supported
 // tab events for them too.
-let interactiveWindows = windows("navigator:browser", { includePrivate: true }).
+var interactiveWindows = windows("navigator:browser", { includePrivate: true }).
                          filter(isInteractive);
-let eventsFromInteractive = merge(interactiveWindows.map(tabEventsFor));
+var eventsFromInteractive = merge(interactiveWindows.map(tabEventsFor));
 
 
 // Finally merge stream of tab events from future windows and current windows
 // to cover all tab events on all windows that will open.
-let allEvents = merge([eventsFromInteractive, eventsFromFuture]);
+var allEvents = merge([eventsFromInteractive, eventsFromFuture]);
 
 // Map events to Fennec format if necessary
 exports.events = map(allEvents, function (event) {
   return !isFennec ? event : {
     type: event.type,
     target: event.target.ownerDocument.defaultView.BrowserApp
             .getTabForBrowser(event.target)
   };
--- a/addon-sdk/source/lib/sdk/tabs/namespace.js
+++ b/addon-sdk/source/lib/sdk/tabs/namespace.js
@@ -1,10 +1,10 @@
 /* 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/. */
 'use strict';
 
-let { ns } = require('../core/namespace');
+var { ns } = require('../core/namespace');
 
 exports.tabsNS = ns();
 exports.tabNS = ns();
 exports.rawTabNS = ns();
--- a/addon-sdk/source/lib/sdk/test/loader.js
+++ b/addon-sdk/source/lib/sdk/test/loader.js
@@ -4,17 +4,17 @@
 "use strict";
 
 const { resolveURI, Require,
         unload, override, descriptor } = require('../../toolkit/loader');
 const { ensure } = require('../system/unload');
 const addonWindow = require('../addon/window');
 const { PlainTextConsole } = require('sdk/console/plain-text');
 
-let defaultGlobals = override(require('../system/globals'), {
+var defaultGlobals = override(require('../system/globals'), {
   console: console
 });
 
 function CustomLoader(module, globals, packaging, overrides={}) {
   let options = packaging || require("@loader/options");
   options = override(options, {
     id: overrides.id || options.id,
     globals: override(defaultGlobals, globals || {}),
--- a/addon-sdk/source/lib/sdk/test/utils.js
+++ b/addon-sdk/source/lib/sdk/test/utils.js
@@ -175,17 +175,17 @@ function waitUntil (predicate, delay) {
     if (!predicate()) return;
     clearInterval(interval);
     resolve();
   }, delay || 10);
   return promise;
 }
 exports.waitUntil = waitUntil;
 
-let cleanUI = function cleanUI() {
+var cleanUI = function cleanUI() {
   let { promise, resolve } = defer();
 
   let windows = getWindows(null, { includePrivate: true });
   if (windows.length > 1) {
     return closeWindow(windows[1]).then(cleanUI);
   }
 
   getTabs(windows[0]).slice(1).forEach(closeTab);
--- a/addon-sdk/source/lib/sdk/timers.js
+++ b/addon-sdk/source/lib/sdk/timers.js
@@ -14,23 +14,23 @@ const { TYPE_ONE_SHOT, TYPE_REPEATING_SL
 const Timer = CC("@mozilla.org/timer;1", "nsITimer");
 const timers = Object.create(null);
 const threadManager = Cc["@mozilla.org/thread-manager;1"].
                       getService(Ci.nsIThreadManager);
 const prefBranch = Cc["@mozilla.org/preferences-service;1"].
                     getService(Ci.nsIPrefService).
                     QueryInterface(Ci.nsIPrefBranch);
 
-let MIN_DELAY = 4;
+var MIN_DELAY = 4;
 // Try to get min timeout delay used by browser.
 try { MIN_DELAY = prefBranch.getIntPref("dom.min_timeout_value"); } finally {}
 
 
 // Last timer id.
-let lastID = 0;
+var lastID = 0;
 
 // Sets typer either by timeout or by interval
 // depending on a given type.
 function setTimer(type, callback, delay, ...args) {
   let id = ++ lastID;
   let timer = timers[id] = Timer();
   timer.initWithCallback({
     notify: function notify() {
@@ -48,19 +48,19 @@ function setTimer(type, callback, delay,
 }
 
 function unsetTimer(id) {
   let timer = timers[id];
   delete timers[id];
   if (timer) timer.cancel();
 }
 
-let immediates = new Map();
+var immediates = new Map();
 
-let dispatcher = _ => {
+var dispatcher = _ => {
   // Allow scheduling of a new dispatch loop.
   dispatcher.scheduled = false;
   // Take a snapshot of timer `id`'s that have being present before
   // starting a dispatch loop, in order to ignore timers registered
   // in side effect to dispatch while also skipping immediates that
   // were removed in side effect.
   let ids = [id for ([id] of immediates)];
   for (let id of ids) {
--- a/addon-sdk/source/lib/sdk/ui/button/action.js
+++ b/addon-sdk/source/lib/sdk/ui/button/action.js
@@ -78,24 +78,24 @@ const ActionButton = Class({
 exports.ActionButton = ActionButton;
 
 identify.define(ActionButton, ({id}) => toWidgetId(id));
 
 getNodeView.define(ActionButton, button =>
   view.nodeFor(toWidgetId(button.id))
 );
 
-let actionButtonStateEvents = events.filter(stateEvents,
+var actionButtonStateEvents = events.filter(stateEvents,
   e => e.target instanceof ActionButton);
 
-let actionButtonViewEvents = events.filter(viewEvents,
+var actionButtonViewEvents = events.filter(viewEvents,
   e => buttons.has(e.target));
 
-let clickEvents = events.filter(actionButtonViewEvents, e => e.type === 'click');
-let updateEvents = events.filter(actionButtonViewEvents, e => e.type === 'update');
+var clickEvents = events.filter(actionButtonViewEvents, e => e.type === 'click');
+var updateEvents = events.filter(actionButtonViewEvents, e => e.type === 'update');
 
 on(clickEvents, 'data', ({target: id, window}) => {
   let button = buttons.get(id);
   let state = getDerivedStateFor(button, getActiveTab(window));
 
   emit(button, 'click', state);
 });
 
--- a/addon-sdk/source/lib/sdk/ui/button/contract.js
+++ b/addon-sdk/source/lib/sdk/ui/button/contract.js
@@ -9,58 +9,58 @@ const { isNil, isObject, isString } = re
 const { required, either, string, boolean, object, number } = require('../../deprecated/api-utils');
 const { merge } = require('../../util/object');
 const { freeze } = Object;
 
 const isIconSet = (icons) =>
   Object.keys(icons).
     every(size => String(size >>> 0) === size && isLocalURL(icons[size]));
 
-let iconSet = {
+var iconSet = {
   is: either(object, string),
   map: v => isObject(v) ? freeze(merge({}, v)) : v,
   ok: v => (isString(v) && isLocalURL(v)) || (isObject(v) && isIconSet(v)),
   msg: 'The option "icon" must be a local URL or an object with ' +
     'numeric keys / local URL values pair.'
 }
 
-let id = {
+var id = {
   is: string,
   ok: v => /^[a-z-_][a-z0-9-_]*$/i.test(v),
   msg: 'The option "id" must be a valid alphanumeric id (hyphens and ' +
         'underscores are allowed).'
 };
 
-let label = {
+var label = {
   is: string,
   ok: v => isNil(v) || v.trim().length > 0,
   msg: 'The option "label" must be a non empty string'
 }
 
-let badge = {
+var badge = {
   is: either(string, number),
   msg: 'The option "badge" must be a string or a number'
 }
 
-let badgeColor = {
+var badgeColor = {
   is: string,
   msg: 'The option "badgeColor" must be a string'
 }
 
-let stateContract = contract({
+var stateContract = contract({
   label: label,
   icon: iconSet,
   disabled: boolean,
   badge: badge,
   badgeColor: badgeColor
 });
 
 exports.stateContract = stateContract;
 
-let buttonContract = contract(merge({}, stateContract.rules, {
+var buttonContract = contract(merge({}, stateContract.rules, {
   id: required(id),
   label: required(label),
   icon: required(iconSet)
 }));
 
 exports.buttonContract = buttonContract;
 
 exports.toggleStateContract = contract(merge({
--- a/addon-sdk/source/lib/sdk/ui/button/toggle.js
+++ b/addon-sdk/source/lib/sdk/ui/button/toggle.js
@@ -79,24 +79,24 @@ const ToggleButton = Class({
 exports.ToggleButton = ToggleButton;
 
 identify.define(ToggleButton, ({id}) => toWidgetId(id));
 
 getNodeView.define(ToggleButton, button =>
   view.nodeFor(toWidgetId(button.id))
 );
 
-let toggleButtonStateEvents = events.filter(stateEvents,
+var toggleButtonStateEvents = events.filter(stateEvents,
   e => e.target instanceof ToggleButton);
 
-let toggleButtonViewEvents = events.filter(viewEvents,
+var toggleButtonViewEvents = events.filter(viewEvents,
   e => buttons.has(e.target));
 
-let clickEvents = events.filter(toggleButtonViewEvents, e => e.type === 'click');
-let updateEvents = events.filter(toggleButtonViewEvents, e => e.type === 'update');
+var clickEvents = events.filter(toggleButtonViewEvents, e => e.type === 'click');
+var updateEvents = events.filter(toggleButtonViewEvents, e => e.type === 'update');
 
 on(toggleButtonStateEvents, 'data', ({target, window, state}) => {
   let id = toWidgetId(target.id);
 
   view.setIcon(id, window, state.icon);
   view.setLabel(id, window, state.label);
   view.setDisabled(id, window, state.disabled);
   view.setChecked(id, window, state.checked);
--- a/addon-sdk/source/lib/sdk/ui/button/view/events.js
+++ b/addon-sdk/source/lib/sdk/ui/button/view/events.js
@@ -8,11 +8,11 @@ module.metadata = {
   'stability': 'experimental',
   'engines': {
     'Firefox': '*',
     'SeaMonkey': '*',
     'Thunderbird': '*'
   }
 };
 
-let channel = {};
+var channel = {};
 
 exports.events = channel;
--- a/addon-sdk/source/lib/sdk/ui/id.js
+++ b/addon-sdk/source/lib/sdk/ui/id.js
@@ -17,11 +17,11 @@ function memoize(f) {
   return function memoizer(o) {
     let key = o;
     if (!memo.has(key))
       memo.set(key, f.apply(this, arguments));
     return memo.get(key);
   };
 }
 
-let identify = method('identify');
+var identify = method('identify');
 identify.define(Object, memoize(function() { return uuid(); }));
 exports.identify = identify;
--- a/addon-sdk/source/lib/sdk/ui/sidebar.js
+++ b/addon-sdk/source/lib/sdk/ui/sidebar.js
@@ -36,17 +36,17 @@ const { uuid } = require('../util/uuid')
 const { viewFor } = require('../view/core');
 
 const resolveURL = (url) => url ? data.url(url) : url;
 
 const sidebarNS = ns();
 
 const WEB_PANEL_BROWSER_ID = 'web-panels-browser';
 
-let sidebars = {};
+var sidebars = {};
 
 const Sidebar = Class({
   implements: [ Disposable ],
   extends: EventTarget,
   setup: function(options) {
     // inital validation for the model information
     let model = sidebarContract(options);
 
--- a/addon-sdk/source/lib/sdk/ui/state.js
+++ b/addon-sdk/source/lib/sdk/ui/state.js
@@ -202,23 +202,23 @@ exports.register = register;
 const unregister = component => {
   remove(components, component);
 }
 exports.unregister = unregister;
 
 const isRegistered = component => has(components, component);
 exports.isRegistered = isRegistered;
 
-let tabSelect = events.filter(tabEvents, e => e.type === 'TabSelect');
-let tabClose = events.filter(tabEvents, e => e.type === 'TabClose');
-let windowOpen = events.filter(browserEvents, e => e.type === 'load');
-let windowClose = events.filter(browserEvents, e => e.type === 'close');
+var tabSelect = events.filter(tabEvents, e => e.type === 'TabSelect');
+var tabClose = events.filter(tabEvents, e => e.type === 'TabClose');
+var windowOpen = events.filter(browserEvents, e => e.type === 'load');
+var windowClose = events.filter(browserEvents, e => e.type === 'close');
 
-let close = events.merge([tabClose, windowClose]);
-let activate = events.merge([windowOpen, tabSelect]);
+var close = events.merge([tabClose, windowClose]);
+var activate = events.merge([windowOpen, tabSelect]);
 
 on(activate, 'data', ({target}) => {
   let [window, tab] = isWindow(target)
                         ? [target, getActiveTab(target)]
                         : [getOwnerWindow(target), target];
 
   if (ignoreWindow(window)) return;
 
--- a/addon-sdk/source/lib/sdk/ui/state/events.js
+++ b/addon-sdk/source/lib/sdk/ui/state/events.js
@@ -8,11 +8,11 @@ module.metadata = {
   'stability': 'experimental',
   'engines': {
     'Firefox': '*',
     'SeaMonkey': '*',
     'Thunderbird': '*'
   }
 };
 
-let channel = {};
+var channel = {};
 
 exports.events = channel;
--- a/addon-sdk/source/lib/sdk/ui/toolbar/model.js
+++ b/addon-sdk/source/lib/sdk/ui/toolbar/model.js
@@ -50,17 +50,17 @@ const validate = contract({
   hidden: {
     is: ["boolean", "undefined"],
     msg: "The `options.hidden` must be boolean"
   }
 });
 
 // Toolbars is a mapping between `toolbar.id` & `toolbar` instances,
 // which is used to find intstance for dispatching events.
-let toolbars = new Map();
+var toolbars = new Map();
 
 const Toolbar = Class({
   extends: EventTarget,
   implements: [Disposable],
   initialize: function(params={}) {
     const options = validate(params);
     const id = titleToId(options.title);
 
--- a/addon-sdk/source/lib/sdk/url.js
+++ b/addon-sdk/source/lib/sdk/url.js
@@ -49,24 +49,24 @@ function resolveResourceURI(uri) {
   catch (e) {
     if (e.result == Cr.NS_ERROR_NOT_AVAILABLE) {
       throw new Error("resource does not exist: " + uri.spec);
     }
   }
   return resolved;
 }
 
-let fromFilename = exports.fromFilename = function fromFilename(path) {
+var fromFilename = exports.fromFilename = function fromFilename(path) {
   var file = Cc['@mozilla.org/file/local;1']
              .createInstance(Ci.nsILocalFile);
   file.initWithPath(path);
   return ios.newFileURI(file).spec;
 };
 
-let toFilename = exports.toFilename = function toFilename(url) {
+var toFilename = exports.toFilename = function toFilename(url) {
   var uri = newURI(url);
   if (uri.scheme == "resource")
     uri = newURI(resolveResourceURI(uri));
   if (uri.scheme == "chrome") {
     var channel = ios.newChannelFromURI2(uri,
                                          null,      // aLoadingNode
                                          Services.scriptSecurityManager.getSystemPrincipal(),
                                          null,      // aTriggeringPrincipal
@@ -295,32 +295,32 @@ const DataURL = Class({
       this.mimeType +
       parametersList.join(";") + "," +
       encodeURIComponent(data);
   }
 });
 
 exports.DataURL = DataURL;
 
-let getTLD = exports.getTLD = function getTLD (url) {
+var getTLD = exports.getTLD = function getTLD (url) {
   let uri = newURI(url.toString());
   let tld = null;
   try {
     tld = tlds.getPublicSuffix(uri);
   }
   catch (e) {
     if (e.result != Cr.NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS &&
         e.result != Cr.NS_ERROR_HOST_IS_IP_ADDRESS) {
       throw e;
     }
   }
   return tld;
 };
 
-let isValidURI = exports.isValidURI = function (uri) {
+var isValidURI = exports.isValidURI = function (uri) {
   try {
     newURI(uri);
   }
   catch(e) {
     return false;
   }
   return true;
 }
--- a/addon-sdk/source/lib/sdk/url/utils.js
+++ b/addon-sdk/source/lib/sdk/url/utils.js
@@ -16,14 +16,14 @@ const { method } = require("../../method
 
 function newURI (uri) {
   if (!isValidURI(uri))
     throw new Error("malformed URI: " + uri);
   return IOService.newURI(uri, null, null);
 }
 exports.newURI = newURI;
 
-let getURL = method('sdk/url:getURL');
+var getURL = method('sdk/url:getURL');
 getURL.define(String, function (url) url);
 getURL.define(function (object) {
   return null;
 });
 exports.getURL = getURL;
--- a/addon-sdk/source/lib/sdk/util/dispatcher.js
+++ b/addon-sdk/source/lib/sdk/util/dispatcher.js
@@ -11,17 +11,17 @@ const method = require("method/core");
 
 // Utility function that is just an enhancement over `method` to
 // allow predicate based dispatch in addition to polymorphic
 // dispatch. Unfortunately polymorphic dispatch does not quite
 // cuts it in the world of XPCOM where no types / classes exist
 // and all the XUL nodes share same type / prototype.
 // Probably this is more generic and belongs some place else, but
 // we can move it later once this will be relevant.
-let dispatcher = hint => {
+var dispatcher = hint => {
   const base = method(hint);
   // Make a map for storing predicate, implementation mappings.
   let implementations = new Map();
 
   // Dispatcher function goes through `predicate, implementation`
   // pairs to find predicate that matches first argument and
   // returns application of arguments on the associated
   // `implementation`. If no matching predicate is found delegates
--- a/addon-sdk/source/lib/sdk/view/core.js
+++ b/addon-sdk/source/lib/sdk/view/core.js
@@ -9,18 +9,18 @@ module.metadata = {
 
 var { Ci } = require("chrome");
 var method = require("../../method/core");
 
 // Returns DOM node associated with a view for
 // the given `value`. If `value` has no view associated
 // it returns `null`. You can implement this method for
 // this type to define what the result should be for it.
-let getNodeView = method("getNodeView");
+var getNodeView = method("getNodeView");
 getNodeView.define(x =>
                      x instanceof Ci.nsIDOMNode ? x :
                      x instanceof Ci.nsIDOMWindow ? x :
                      null);
 exports.getNodeView = getNodeView;
 exports.viewFor = getNodeView;
 
-let getActiveView = method("getActiveView");
+var getActiveView = method("getActiveView");
 exports.getActiveView = getActiveView;
--- a/addon-sdk/source/lib/sdk/window/events.js
+++ b/addon-sdk/source/lib/sdk/window/events.js
@@ -22,25 +22,25 @@ function eventsFor(window) {
   let changes = filter(states, function({target}) target === window.document);
   return map(changes, function({type, target}) {
     return { type: type, target: target.defaultView }
   });
 }
 
 // In addition to observing windows that are open we also observe windows
 // that are already already opened in case they're in process of loading.
-let opened = windows(null, { includePrivate: true });
-let currentEvents = merge(opened.map(eventsFor));
+var opened = windows(null, { includePrivate: true });
+var currentEvents = merge(opened.map(eventsFor));
 
 // Register system event listeners for top level window open / close.
 function rename({type, target, data}) {
   return { type: rename[type], target: target, data: data }
 }
 rename.domwindowopened = "open";
 rename.domwindowclosed = "close";
 
-let openEvents = map(observe("domwindowopened"), rename);
-let closeEvents = map(observe("domwindowclosed"), rename);
-let futureEvents = expand(openEvents, function({target}) eventsFor(target));
+var openEvents = map(observe("domwindowopened"), rename);
+var closeEvents = map(observe("domwindowclosed"), rename);
+var futureEvents = expand(openEvents, function({target}) eventsFor(target));
 
-let channel = merge([currentEvents, futureEvents,
+var channel = merge([currentEvents, futureEvents,
                      openEvents, closeEvents]);
 exports.events = channel;
--- a/addon-sdk/source/lib/sdk/window/utils.js
+++ b/addon-sdk/source/lib/sdk/window/utils.js
@@ -216,17 +216,17 @@ function onFocus(window) {
       resolve(window);
     }, true);
   }
 
   return promise;
 }
 exports.onFocus = onFocus;
 
-let isFocused = dispatcher("window-isFocused");
+var isFocused = dispatcher("window-isFocused");
 isFocused.when(x => x instanceof Ci.nsIDOMWindow, (window) => {
   const FM = Cc["@mozilla.org/focus-manager;1"].
                 getService(Ci.nsIFocusManager);
 
   let childTargetWindow = {};
   FM.getFocusedElementForWindow(window, true, childTargetWindow);
   childTargetWindow = childTargetWindow.value;
 
--- a/addon-sdk/source/lib/sdk/windows/fennec.js
+++ b/addon-sdk/source/lib/sdk/windows/fennec.js
@@ -12,17 +12,17 @@ const { on, off, once, emit } = require(
 const { method } = require('../lang/functional');
 const { EventTarget } = require('../event/target');
 const { List, addListItem } = require('../util/list');
 
 const ERR_FENNEC_MSG = 'This method is not yet supported by Fennec, consider using require("sdk/tabs") instead';
 
 // NOTE: On Fennec there is only one window.
 
-let BrowserWindows = Class({
+var BrowserWindows = Class({
   implements: [ List ],
   extends: EventTarget,
   initialize: function() {
     List.prototype.initialize.apply(this);
   },
   get activeWindow() {
     let window = getMostRecentBrowserWindow();
     return window ? getBrowserWindow({window: window}) : null;
--- a/addon-sdk/source/lib/sdk/windows/firefox.js
+++ b/addon-sdk/source/lib/sdk/windows/firefox.js
@@ -183,17 +183,17 @@ function makeNewWindow(domWindow, browse
 }
 
 for (let domWindow of windows()) {
   let window = makeNewWindow(domWindow);
   if (window instanceof BrowserWindow)
     addListItem(browserWindows, window);
 }
 
-let windowEventListener = (event, domWindow, ...args) => {
+var windowEventListener = (event, domWindow, ...args) => {
   if (ignoreWindow(domWindow))
     return;
 
   let window = modelsFor.get(domWindow);
   if (!window)
     window = makeNewWindow(domWindow);
 
   if (isBrowser(domWindow)) {
--- a/addon-sdk/source/lib/sdk/windows/tabs-fennec.js
+++ b/addon-sdk/source/lib/sdk/windows/tabs-fennec.js
@@ -85,17 +85,17 @@ const Tabs = Class({
       tab.on('pageshow', options.onPageShow);
 
     if (options.onActivate)
       tab.on('activate', options.onActivate);
 
     return tab;
   }
 });
-let gTabs = exports.tabs = Tabs(mainWindow);
+var gTabs = exports.tabs = Tabs(mainWindow);
 
 function tabsUnloader(event, window) {
   window = window || (event && event.target);
   if (!(window && window.BrowserApp))
     return;
   window.BrowserApp.deck.removeEventListener(EVENTS.open.dom, onTabOpen, false);
   window.BrowserApp.deck.removeEventListener(EVENTS.activate.dom, onTabSelect, false);
 }
--- a/addon-sdk/source/lib/toolkit/loader.js
+++ b/addon-sdk/source/lib/toolkit/loader.js
@@ -932,23 +932,23 @@ function Loader(options) {
     returnObj.requireMap = { enumerable: false, value: requireMap };
     returnObj.rootURI = { enumerable: false, value: addTrailingSlash(rootURI) };
   }
 
   return freeze(create(null, returnObj));
 };
 Loader.Loader = Loader;
 
-let isJSONURI = uri => uri.substr(-5) === '.json';
-let isJSMURI = uri => uri.substr(-4) === '.jsm';
-let isJSURI = uri => uri.substr(-3) === '.js';
-let isAbsoluteURI = uri => uri.indexOf("resource://") >= 0 ||
+var isJSONURI = uri => uri.substr(-5) === '.json';
+var isJSMURI = uri => uri.substr(-4) === '.jsm';
+var isJSURI = uri => uri.substr(-3) === '.js';
+var isAbsoluteURI = uri => uri.indexOf("resource://") >= 0 ||
                            uri.indexOf("chrome://") >= 0 ||
                            uri.indexOf("file://") >= 0
-let isRelative = id => id[0] === '.'
+var isRelative = id => id[0] === '.'
 
 const generateMap = iced(function generateMap(options, callback) {
   let { rootURI, resolve, paths } = override({
     paths: {},
     resolve: Loader.nodeResolve
   }, options);
 
   rootURI = addTrailingSlash(rootURI);
--- a/addon-sdk/source/modules/system/Startup.js
+++ b/addon-sdk/source/modules/system/Startup.js
@@ -21,21 +21,21 @@ const NAME2TOPIC = {
   'Thunderbird': 'mail-startup-done'
 };
 
 var Startup = {
   initialized: !appStartupSrv.startingUp
 };
 var exports = Startup;
 
-let gOnceInitializedDeferred = defer();
+var gOnceInitializedDeferred = defer();
 exports.onceInitialized = gOnceInitializedDeferred.promise;
 
 // Set 'final-ui-startup' as default topic for unknown applications
-let appStartup = 'final-ui-startup';
+var appStartup = 'final-ui-startup';
 
 if (Startup.initialized) {
   gOnceInitializedDeferred.resolve()
 }
 else {
   // Gets the topic that fit best as application startup event, in according with
   // the current application (e.g. Firefox, Fennec, Thunderbird...)
   for (let name of Object.keys(NAME2TOPIC)) {
--- a/addon-sdk/source/python-lib/cuddlefish/mobile-utils/bootstrap.js
+++ b/addon-sdk/source/python-lib/cuddlefish/mobile-utils/bootstrap.js
@@ -2,17 +2,17 @@
  * 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/. */
 "use strict";
 
 const Cu = Components.utils;
 
 Cu.import("resource://gre/modules/Services.jsm");
 
-let { log } = console;
+var { log } = console;
 
 function startup(data, reason) {
   // This code allow to make all stdIO work
   try {
     Cu.import("resource://gre/modules/ctypes.jsm");
     let libdvm = ctypes.open("libdvm.so");
     let dvmStdioConverterStartup;
     // Starting with Android ICS, dalvik uses C++.
--- a/addon-sdk/source/test/addons/e10s-content/data/test-page-worker.js
+++ b/addon-sdk/source/test/addons/e10s-content/data/test-page-worker.js
@@ -3,24 +3,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 // get title directly
 self.postMessage(["equal", document.title, "Page Worker test",
             "Correct page title accessed directly"]);
 
 // get <p> directly
-let p = document.getElementById("paragraph");
+var p = document.getElementById("paragraph");
 self.postMessage(["ok", !!p, "<p> can be accessed directly"]);
 self.postMessage(["equal", p.firstChild.nodeValue,
             "Lorem ipsum dolor sit amet.",
             "Correct text node expected"]);
 
 // Modify page
-let div = document.createElement("div");
+var div = document.createElement("div");
 div.setAttribute("id", "block");
 div.appendChild(document.createTextNode("Test text created"));
 document.body.appendChild(div);
 
 // Check back the modification
 div = document.getElementById("block");
 self.postMessage(["ok", !!div, "<div> can be accessed directly"]);
 self.postMessage(["equal", div.firstChild.nodeValue,
--- a/addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js
+++ b/addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js
@@ -87,17 +87,17 @@ function createWorker(assert, xrayWindow
     assert.ok(data.assertion, data.msg);
   });
 
   return worker;
 }
 
 /* Examples for the `createProxyTest` uses */
 
-let html = "<script>var documentGlobal = true</script>";
+var html = "<script>var documentGlobal = true</script>";
 
 exports["test Create Proxy Test"] = createProxyTest(html, function (helper, assert) {
   // You can get access to regular `test` object in second argument of
   // `createProxyTest` method:
   assert.ok(helper.rawWindow.documentGlobal,
               "You have access to a raw window reference via `helper.rawWindow`");
   assert.ok(!("documentGlobal" in helper.xrayWindow),
               "You have access to an XrayWrapper reference via `helper.xrayWindow`");
@@ -164,17 +164,17 @@ exports["test Shared To String Proxies"]
         done();
       }
     );
   });
 });
 */
 
 // Ensure that postMessage is working correctly across documents with an iframe
-let html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
+var html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
 exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
   let ifWindow = helper.xrayWindow.document.getElementById("iframe").contentWindow;
   // Listen without proxies, to check that it will work in regular case
   // simulate listening from a web document.
   ifWindow.addEventListener("message", function listener(event) {
     ifWindow.removeEventListener("message", listener, false);
     // As we are in system principal, event is an XrayWrapper
     // xrays use current compartments when calling postMessage method.
@@ -194,17 +194,17 @@ exports["test postMessage"] = createProx
     'new ' + function ContentScriptScope() {
       var json = JSON.stringify({foo : "bar\n \"escaped\"."});
 
       document.getElementById("iframe").contentWindow.postMessage(json, "*");
     }
   );
 });
 
-let html = '<input id="input2" type="checkbox" />';
+var html = '<input id="input2" type="checkbox" />';
 exports["test Object Listener"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       // Test objects being given as event listener
       let input = document.getElementById("input2");
       let myClickListener = {
         called: false,
@@ -250,17 +250,17 @@ exports["test Object Listener 2"] = crea
 
       window.addEventListener("message", myMessageListener, true);
       document.defaultView.postMessage("ok", '*');
     }
   ).replace("TOKEN", testHost));
 
 });
 
-let html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
+var html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
              '<input id="input2" type="checkbox" />';
 
 exports.testStringOverload = createProxyTest(html, function (helper, assert) {
   // Proxy - toString error
   let originalString = "string";
   let p = Proxy.create({
     get: function(receiver, name) {
       if (name == "binded")
@@ -499,17 +499,17 @@ exports["test Document TagName"] = creat
       assert(document.test == img, "document[imgName] is valid");
       body.removeChild(img);
       done();
     }
   );
 
 });
 
-let html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
+var html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
 exports["test Window Frames"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'let glob = this; new ' + function ContentScriptScope() {
       // Check window[frameName] and window.frames[i]
       let iframe = document.getElementById("iframe");
       //assert(window.frames.length == 1, "The iframe is reported in window.frames check1");
       //assert(window.frames[0] == iframe.contentWindow, "The iframe is reported in window.frames check2");
@@ -534,17 +534,17 @@ exports["test Collections"] = createProx
       assert(tds[0] == tds[0], "We can get array element multiple times");
       body.removeChild(div);
       done();
     }
   );
 
 });
 
-let html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
+var html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
              '<input id="input2" type="checkbox" />';
 exports["test Collections 2"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       // Verify that NodeList/HTMLCollection are working fine
       let body = document.body;
       let inputs = body.getElementsByTagName("input");
@@ -651,17 +651,17 @@ exports["test Functions"] = createProxyT
       let closure = function () {};
       assert(window.wrappedJSObject.isEqual(closure, closure), "Function references are cached before being wrapped to native");
       done();
     }
   );
 
 });
 
-let html = '<input id="input2" type="checkbox" />';
+var html = '<input id="input2" type="checkbox" />';
 exports["test Listeners"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       // Verify listeners:
       let input = document.getElementById("input2");
       assert(input, "proxy.getElementById works");
 
@@ -785,17 +785,17 @@ exports["test Cross Domain Iframe"] = cr
     server.stop(helper.done);
   });
 
   worker.postMessage("http://localhost:" + serverPort + "/");
 
 });
 
 // Bug 769006: Ensure that MutationObserver works fine with proxies
-let html = '<a href="foo">link</a>';
+var html = '<a href="foo">link</a>';
 exports["test MutationObvserver"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       if (typeof MutationObserver == "undefined") {
         assert(true, "No MutationObserver for this FF version");
         done();
         return;
@@ -823,17 +823,17 @@ exports["test MutationObvserver"] = crea
 
       // Modify the DOM
       link.setAttribute("href", "bar");
     }
   );
 
 });
 
-let html = '<script>' +
+var html = '<script>' +
   'var accessCheck = function() {' +
   '  assert(true, "exporting function works");' +
   '  try{' +
   '    exportedObj.prop;' +
   '    assert(false, "content should not have access to content-script");' +
   '  } catch(e) {' +
   '    assert(e.toString().indexOf("Permission denied") != -1,' +
   '           "content should not have access to content-script");' +
--- a/addon-sdk/source/test/addons/e10s-remote/remote-module.js
+++ b/addon-sdk/source/test/addons/e10s-remote/remote-module.js
@@ -18,17 +18,17 @@ log("module loaded");
 
 process.port.emit('sdk/test/load');
 
 process.port.on('sdk/test/ping', (process, key) => {
   log("received process ping");
   process.port.emit('sdk/test/pong', key);
 });
 
-let frameCount = 0;
+var frameCount = 0;
 frames.forEvery(frame => {
   frameCount++;
   frame.on('detach', () => {
     frameCount--;
   });
 
   frame.port.on('sdk/test/ping', (frame, key) => {
     log("received frame ping");
--- a/addon-sdk/source/test/addons/e10s-tabs/lib/test-tab-events.js
+++ b/addon-sdk/source/test/addons/e10s-tabs/lib/test-tab-events.js
@@ -7,17 +7,17 @@
 const { Loader } = require("sdk/test/loader");
 const utils = require("sdk/tabs/utils");
 const { open, close } = require("sdk/window/helpers");
 const { getMostRecentBrowserWindow } = require("sdk/window/utils");
 const { events } = require("sdk/tab/events");
 const { on, off } = require("sdk/event/core");
 const { resolve, defer } = require("sdk/core/promise");
 
-let isFennec = require("sdk/system/xul-app").is("Fennec");
+var isFennec = require("sdk/system/xul-app").is("Fennec");
 
 function test(options) {
   return function(assert, done) {
     let tabEvents = [];
     let tabs = [];
     let { promise, resolve: resolveP } = defer();
     let win = isFennec ? resolve(getMostRecentBrowserWindow()) :
       open(null, {
--- a/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js
+++ b/addon-sdk/source/test/addons/l10n-properties/app-extension/bootstrap.js
@@ -28,20 +28,20 @@ const vc = Cc["@mozilla.org/xpcom/versio
 
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 
 const REASON = [ 'unknown', 'startup', 'shutdown', 'enable', 'disable',
                  'install', 'uninstall', 'upgrade', 'downgrade' ];
 
 const bind = Function.call.bind(Function.bind);
 
-let loader = null;
-let unload = null;
-let cuddlefishSandbox = null;
-let nukeTimer = null;
+var loader = null;
+var unload = null;
+var cuddlefishSandbox = null;
+var nukeTimer = null;
 
 // Utility function that synchronously reads local resource from the given
 // `uri` and returns content string.
 function readURI(uri) {
   let ioservice = Cc['@mozilla.org/network/io-service;1'].
     getService(Ci.nsIIOService);
   let channel = ioservice.newChannel2(uri,
                                       'UTF-8',
--- a/addon-sdk/source/test/addons/main/main.js
+++ b/addon-sdk/source/test/addons/main/main.js
@@ -1,16 +1,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/. */
 'use strict';
 
 const { setTimeout } = require('sdk/timers');
 
-let mainStarted = false;
+var mainStarted = false;
 
 exports.main = function main(options, callbacks) {
   mainStarted = true;
 
   let tests = {};
 
   tests.testMainArguments = function(assert) {
   	assert.ok(!!options, 'options argument provided to main');
--- a/addon-sdk/source/test/addons/page-mod-debugger-post/main.js
+++ b/addon-sdk/source/test/addons/page-mod-debugger-post/main.js
@@ -11,23 +11,23 @@ const promise = require('sdk/core/promis
 const { getMostRecentBrowserWindow } = require('sdk/window/utils');
 const { data } = require('sdk/self');
 const { set } = require('sdk/preferences/service');
 
 const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
 const { DebuggerServer } = devtoolsRequire("devtools/server/main");
 const { DebuggerClient } = devtoolsRequire("devtools/toolkit/client/main");
 
-let gClient;
-let ok;
-let testName = 'testDebugger';
-let iframeURL = 'data:text/html;charset=utf-8,' + testName;
-let TAB_URL = 'data:text/html;charset=utf-8,' + encodeURIComponent('<iframe src="' + iframeURL + '" />');
+var gClient;
+var ok;
+var testName = 'testDebugger';
+var iframeURL = 'data:text/html;charset=utf-8,' + testName;
+var TAB_URL = 'data:text/html;charset=utf-8,' + encodeURIComponent('<iframe src="' + iframeURL + '" />');
 TAB_URL = data.url('index.html');
-let mod;
+var mod;
 
 exports.testDebugger = function(assert, done) {
   ok = assert.ok.bind(assert);
   assert.pass('starting test');
   set('devtools.debugger.log', true);
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
--- a/addon-sdk/source/test/addons/page-mod-debugger-pre/main.js
+++ b/addon-sdk/source/test/addons/page-mod-debugger-pre/main.js
@@ -11,23 +11,23 @@ const promise = require('sdk/core/promis
 const { getMostRecentBrowserWindow } = require('sdk/window/utils');
 const { data } = require('sdk/self');
 const { set } = require('sdk/preferences/service');
 
 const { require: devtoolsRequire } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
 const { DebuggerServer } = devtoolsRequire("devtools/server/main");
 const { DebuggerClient } = devtoolsRequire("devtools/toolkit/client/main");
 
-let gClient;
-let ok;
-let testName = 'testDebugger';
-let iframeURL = 'data:text/html;charset=utf-8,' + testName;
-let TAB_URL = 'data:text/html;charset=utf-8,' + encodeURIComponent('<iframe src="' + iframeURL + '" />');
+var gClient;
+var ok;
+var testName = 'testDebugger';
+var iframeURL = 'data:text/html;charset=utf-8,' + testName;
+var TAB_URL = 'data:text/html;charset=utf-8,' + encodeURIComponent('<iframe src="' + iframeURL + '" />');
 TAB_URL = data.url('index.html');
-let mod;
+var mod;
 
 exports.testDebugger = function(assert, done) {
   ok = assert.ok.bind(assert);
   assert.pass('starting test');
   set('devtools.debugger.log', true);
 
   mod = PageMod({
     include: TAB_URL,
--- a/addon-sdk/source/test/addons/places/lib/favicon-helpers.js
+++ b/addon-sdk/source/test/addons/places/lib/favicon-helpers.js
@@ -46,9 +46,9 @@ function serve ({name, favicon, port, ho
   return OS.File.writeAtomic(iconPath, favicon).
     then(() => {
       return OS.File.writeAtomic(pagePath, content);
     }).
     then(() => srv);
 }
 exports.serve = serve;
 
-let binFavicon = exports.binFavicon = atob('AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYABAQEAAgICAAMDAwAERERABYWFgAcHBwAIiIiACkpKQBVVVUATU1NAEJCQgA5OTkAgHz/AFBQ/wCTANYA/+zMAMbW7wDW5+cAkKmtAAAAMwAAAGYAAACZAAAAzAAAMwAAADMzAAAzZgAAM5kAADPMAAAz/wAAZgAAAGYzAABmZgAAZpkAAGbMAABm/wAAmQAAAJkzAACZZgAAmZkAAJnMAACZ/wAAzAAAAMwzAADMZgAAzJkAAMzMAADM/wAA/2YAAP+ZAAD/zAAzAAAAMwAzADMAZgAzAJkAMwDMADMA/wAzMwAAMzMzADMzZgAzM5kAMzPMADMz/wAzZgAAM2YzADNmZgAzZpkAM2bMADNm/wAzmQAAM5kzADOZZgAzmZkAM5nMADOZ/wAzzAAAM8wzADPMZgAzzJkAM8zMADPM/wAz/zMAM/9mADP/mQAz/8wAM///AGYAAABmADMAZgBmAGYAmQBmAMwAZgD/AGYzAABmMzMAZjNmAGYzmQBmM8wAZjP/AGZmAABmZjMAZmZmAGZmmQBmZswAZpkAAGaZMwBmmWYAZpmZAGaZzABmmf8AZswAAGbMMwBmzJkAZszMAGbM/wBm/wAAZv8zAGb/mQBm/8wAzAD/AP8AzACZmQAAmTOZAJkAmQCZAMwAmQAAAJkzMwCZAGYAmTPMAJkA/wCZZgAAmWYzAJkzZgCZZpkAmWbMAJkz/wCZmTMAmZlmAJmZmQCZmcwAmZn/AJnMAACZzDMAZsxmAJnMmQCZzMwAmcz/AJn/AACZ/zMAmcxmAJn/mQCZ/8wAmf//AMwAAACZADMAzABmAMwAmQDMAMwAmTMAAMwzMwDMM2YAzDOZAMwzzADMM/8AzGYAAMxmMwCZZmYAzGaZAMxmzACZZv8AzJkAAMyZMwDMmWYAzJmZAMyZzADMmf8AzMwAAMzMMwDMzGYAzMyZAMzMzADMzP8AzP8AAMz/MwCZ/2YAzP+ZAMz/zADM//8AzAAzAP8AZgD/AJkAzDMAAP8zMwD/M2YA/zOZAP8zzAD/M/8A/2YAAP9mMwDMZmYA/2aZAP9mzADMZv8A/5kAAP+ZMwD/mWYA/5mZAP+ZzAD/mf8A/8wAAP/MMwD/zGYA/8yZAP/MzAD/zP8A//8zAMz/ZgD//5kA///MAGZm/wBm/2YAZv//AP9mZgD/Zv8A//9mACEApQBfX18Ad3d3AIaGhgCWlpYAy8vLALKysgDX19cA3d3dAOPj4wDq6uoA8fHxAPj4+ADw+/8ApKCgAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8ACgoKCgoKCgoKCgoKCgoKCgoKCgoHAQEMbQoKCgoKCgoAAAdDH/kgHRIAAAAAAAAAAADrHfn5ASQQAAAAAAAAAArsBx0B+fkgHesAAAAAAAD/Cgwf+fn5IA4dEus/IvcACgcMAfkg+QEB+SABHushbf8QHR/5HQH5+QEdHetEHx4K7B/5+QH5+fkdDBL5+SBE/wwdJfkf+fn5AR8g+fkfEArsCh/5+QEeJR/5+SAeBwAACgoe+SAlHwFAEhAfAAAAAPcKHh8eASYBHhAMAAAAAAAA9EMdIB8gHh0dBwAAAAAAAAAA7BAdQ+wHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AADwfwAAwH8AAMB/AAAAPwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAgAcAAIAPAADADwAA8D8AAP//AAA');
+var binFavicon = exports.binFavicon = atob('AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYABAQEAAgICAAMDAwAERERABYWFgAcHBwAIiIiACkpKQBVVVUATU1NAEJCQgA5OTkAgHz/AFBQ/wCTANYA/+zMAMbW7wDW5+cAkKmtAAAAMwAAAGYAAACZAAAAzAAAMwAAADMzAAAzZgAAM5kAADPMAAAz/wAAZgAAAGYzAABmZgAAZpkAAGbMAABm/wAAmQAAAJkzAACZZgAAmZkAAJnMAACZ/wAAzAAAAMwzAADMZgAAzJkAAMzMAADM/wAA/2YAAP+ZAAD/zAAzAAAAMwAzADMAZgAzAJkAMwDMADMA/wAzMwAAMzMzADMzZgAzM5kAMzPMADMz/wAzZgAAM2YzADNmZgAzZpkAM2bMADNm/wAzmQAAM5kzADOZZgAzmZkAM5nMADOZ/wAzzAAAM8wzADPMZgAzzJkAM8zMADPM/wAz/zMAM/9mADP/mQAz/8wAM///AGYAAABmADMAZgBmAGYAmQBmAMwAZgD/AGYzAABmMzMAZjNmAGYzmQBmM8wAZjP/AGZmAABmZjMAZmZmAGZmmQBmZswAZpkAAGaZMwBmmWYAZpmZAGaZzABmmf8AZswAAGbMMwBmzJkAZszMAGbM/wBm/wAAZv8zAGb/mQBm/8wAzAD/AP8AzACZmQAAmTOZAJkAmQCZAMwAmQAAAJkzMwCZAGYAmTPMAJkA/wCZZgAAmWYzAJkzZgCZZpkAmWbMAJkz/wCZmTMAmZlmAJmZmQCZmcwAmZn/AJnMAACZzDMAZsxmAJnMmQCZzMwAmcz/AJn/AACZ/zMAmcxmAJn/mQCZ/8wAmf//AMwAAACZADMAzABmAMwAmQDMAMwAmTMAAMwzMwDMM2YAzDOZAMwzzADMM/8AzGYAAMxmMwCZZmYAzGaZAMxmzACZZv8AzJkAAMyZMwDMmWYAzJmZAMyZzADMmf8AzMwAAMzMMwDMzGYAzMyZAMzMzADMzP8AzP8AAMz/MwCZ/2YAzP+ZAMz/zADM//8AzAAzAP8AZgD/AJkAzDMAAP8zMwD/M2YA/zOZAP8zzAD/M/8A/2YAAP9mMwDMZmYA/2aZAP9mzADMZv8A/5kAAP+ZMwD/mWYA/5mZAP+ZzAD/mf8A/8wAAP/MMwD/zGYA/8yZAP/MzAD/zP8A//8zAMz/ZgD//5kA///MAGZm/wBm/2YAZv//AP9mZgD/Zv8A//9mACEApQBfX18Ad3d3AIaGhgCWlpYAy8vLALKysgDX19cA3d3dAOPj4wDq6uoA8fHxAPj4+ADw+/8ApKCgAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8ACgoKCgoKCgoKCgoKCgoKCgoKCgoHAQEMbQoKCgoKCgoAAAdDH/kgHRIAAAAAAAAAAADrHfn5ASQQAAAAAAAAAArsBx0B+fkgHesAAAAAAAD/Cgwf+fn5IA4dEus/IvcACgcMAfkg+QEB+SABHushbf8QHR/5HQH5+QEdHetEHx4K7B/5+QH5+fkdDBL5+SBE/wwdJfkf+fn5AR8g+fkfEArsCh/5+QEeJR/5+SAeBwAACgoe+SAlHwFAEhAfAAAAAPcKHh8eASYBHhAMAAAAAAAA9EMdIB8gHh0dBwAAAAAAAAAA7BAdQ+wHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AADwfwAAwH8AAMB/AAAAPwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAgAcAAIAPAADADwAA8D8AAP//AAA');
--- a/addon-sdk/source/test/addons/places/lib/test-places-favicon.js
+++ b/addon-sdk/source/test/addons/places/lib/test-places-favicon.js
@@ -211,32 +211,32 @@ exports.testRejects = function*(assert) 
 
   yield getFavicon(undefined)
     .then(invalidResolve(assert), validReject(assert, 'undefined'));
 
   yield getFavicon([])
     .then(invalidResolve(assert), validReject(assert, 'Array'));
 };
 
-let invalidResolve = (assert) => () => assert.fail('Promise should not be resolved successfully');
-let validReject = (assert, name) => () => assert.pass(name + ' correctly rejected');
+var invalidResolve = (assert) => () => assert.fail('Promise should not be resolved successfully');
+var validReject = (assert, name) => () => assert.pass(name + ' correctly rejected');
 
-let makeServer = (name) => serve({
+var makeServer = (name) => serve({
   name: name,
   favicon: binFavicon,
   port: port,
   host: host
 });
 
-let waitAndExpire = (url) => new Promise(resolve => {
+var waitAndExpire = (url) => new Promise(resolve => {
   onFaviconChange(url).then(() => {
     once('places-favicons-expired', resolve);
     faviconService.expireAllFavicons();
   });
 });
 
-let complete = (tab, srv) => new Promise(resolve => {
+var complete = (tab, srv) => new Promise(resolve => {
   tab.close(() => {
     resetPlaces(() => {
       srv.stop(resolve);
     });
   });
 });
--- a/addon-sdk/source/test/addons/remote/remote-module.js
+++ b/addon-sdk/source/test/addons/remote/remote-module.js
@@ -18,17 +18,17 @@ log("module loaded");
 
 process.port.emit('sdk/test/load');
 
 process.port.on('sdk/test/ping', (process, key) => {
   log("received process ping");
   process.port.emit('sdk/test/pong', key);
 });
 
-let frameCount = 0;
+var frameCount = 0;
 frames.forEvery(frame => {
   frameCount++;
   frame.on('detach', () => {
     frameCount--;
   });
 
   frame.port.on('sdk/test/ping', (frame, key) => {
     log("received frame ping");
--- a/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js
+++ b/addon-sdk/source/test/addons/simple-prefs-regression/app-extension/bootstrap.js
@@ -28,20 +28,20 @@ const vc = Cc["@mozilla.org/xpcom/versio
 
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 
 const REASON = [ 'unknown', 'startup', 'shutdown', 'enable', 'disable',
                  'install', 'uninstall', 'upgrade', 'downgrade' ];
 
 const bind = Function.call.bind(Function.bind);
 
-let loader = null;
-let unload = null;
-let cuddlefishSandbox = null;
-let nukeTimer = null;
+var loader = null;
+var unload = null;
+var cuddlefishSandbox = null;
+var nukeTimer = null;
 
 // Utility function that synchronously reads local resource from the given
 // `uri` and returns content string.
 function readURI(uri) {
   let ioservice = Cc['@mozilla.org/network/io-service;1'].
     getService(Ci.nsIIOService);
   let channel = ioservice.newChannel2(uri,
                                       'UTF-8',
--- a/addon-sdk/source/test/addons/tab-close-on-startup/main.js
+++ b/addon-sdk/source/test/addons/tab-close-on-startup/main.js
@@ -1,17 +1,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/. */
 'use strict';
 
 const { setTimeout } = require('sdk/timers');
 const tabs = require('sdk/tabs');
 
-let closeEvents = 0;
+var closeEvents = 0;
 const closeEventDetector = _ => closeEvents++;
 
 exports.testNoTabCloseOnStartup = function(assert, done) {
   setTimeout(_ => {
     assert.equal(closeEvents, 0, 'there were no tab close events detected');
     tabs.open({
       url: 'about:mozilla',
       inBackground: true,
--- a/addon-sdk/source/test/fixtures/addon-sdk/data/test-page-worker.js
+++ b/addon-sdk/source/test/fixtures/addon-sdk/data/test-page-worker.js
@@ -3,24 +3,24 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 // get title directly
 self.postMessage(["equal", document.title, "Page Worker test",
             "Correct page title accessed directly"]);
 
 // get <p> directly
-let p = document.getElementById("paragraph");
+var p = document.getElementById("paragraph");
 self.postMessage(["ok", !!p, "<p> can be accessed directly"]);
 self.postMessage(["equal", p.firstChild.nodeValue,
             "Lorem ipsum dolor sit amet.",
             "Correct text node expected"]);
 
 // Modify page
-let div = document.createElement("div");
+var div = document.createElement("div");
 div.setAttribute("id", "block");
 div.appendChild(document.createTextNode("Test text created"));
 document.body.appendChild(div);
 
 // Check back the modification
 div = document.getElementById("block");
 self.postMessage(["ok", !!div, "<div> can be accessed directly"]);
 self.postMessage(["equal", div.firstChild.nodeValue,
--- a/addon-sdk/source/test/fixtures/child-process-scripts.js
+++ b/addon-sdk/source/test/fixtures/child-process-scripts.js
@@ -8,17 +8,17 @@ const { platform, pathFor } = require('s
 const { defer } = require('sdk/core/promise');
 const { emit } = require('sdk/event/core');
 const { join } = require('sdk/fs/path');
 const { writeFile, unlinkSync, existsSync } = require('sdk/io/fs');
 const PROFILE_DIR= pathFor('ProfD');
 const isWindows = platform.toLowerCase().indexOf('win') === 0;
 const isOSX = platform.toLowerCase().indexOf('darwin') === 0;
 
-let scripts = {
+var scripts = {
   'args.sh': 'echo $1 $2 $3 $4',
   'args.bat': 'echo %1 %2 %3 %4',
   'check-env.sh': 'echo $CHILD_PROCESS_ENV_TEST',
   'check-env.bat': 'echo %CHILD_PROCESS_ENV_TEST%',
   'check-pwd.sh': 'echo $PWD',
   'check-pwd.bat': 'cd',
   'large-err.sh': 'for n in `seq 0 $1` ; do echo "E" 1>&2; done',
   'large-err-mac.sh': 'for ((i=0; i<$1; i=i+1)); do echo "E" 1>&2; done',
--- a/addon-sdk/source/test/fixtures/chrome-worker/xhr.js
+++ b/addon-sdk/source/test/fixtures/chrome-worker/xhr.js
@@ -1,11 +1,11 @@
 /* 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/. */
 'use strict';
 
-let xhr = new XMLHttpRequest();
+var xhr = new XMLHttpRequest();
 xhr.open("GET", "data:text/plain,ok", true);
 xhr.onload = function () {
   postMessage(xhr.responseText);
 };
 xhr.send(null);
--- a/addon-sdk/source/test/fixtures/jsm-package/index.js
+++ b/addon-sdk/source/test/fixtures/jsm-package/index.js
@@ -1,46 +1,46 @@
 /* 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/. */
 
 'use strict';
 
-let { Test } = require('./Test.jsm');
-let { Test: Test2 } = require('./Test.jsm');
+var { Test } = require('./Test.jsm');
+var { Test: Test2 } = require('./Test.jsm');
 exports.localJSM = Test.square(16) === 256;
 exports.localJSMCached = Test === Test2;
 
 (function () {
-let { Promise } = require('resource://gre/modules/Promise.jsm');
-let { defer } = require('resource://gre/modules/Promise.jsm').Promise;
+var { Promise } = require('resource://gre/modules/Promise.jsm');
+var { defer } = require('resource://gre/modules/Promise.jsm').Promise;
 
 exports.isCachedAbsolute = Promise.defer === defer;
 
 exports.isLoadedAbsolute = function (val) {
   let { promise, resolve } = Promise.defer();
   resolve(val);
   return promise;
 };
 })();
 
 (function () {
-let { Promise } = require('modules/Promise.jsm');
-let { defer } = require('modules/Promise.jsm').Promise;
+var { Promise } = require('modules/Promise.jsm');
+var { defer } = require('modules/Promise.jsm').Promise;
 exports.isCachedPath = Promise.defer === defer;
 
 exports.isLoadedPath = function (val) {
   let { promise, resolve } = Promise.defer();
   resolve(val);
   return promise;
 };
 })();
 
 (function () {
-let { defer } = require('resource://gre/modules/commonjs/sdk/core/promise.js');
-let { defer: defer2 } = require('resource://gre/modules/commonjs/sdk/core/promise.js');
+var { defer } = require('resource://gre/modules/commonjs/sdk/core/promise.js');
+var { defer: defer2 } = require('resource://gre/modules/commonjs/sdk/core/promise.js');
 exports.isCachedJSAbsolute = defer === defer2;
 exports.isLoadedJSAbsolute = function (val) {
   let { promise, resolve } = defer();
   resolve(val);
   return promise;
 };
 })();
--- a/addon-sdk/source/test/fixtures/native-addon-test/index.js
+++ b/addon-sdk/source/test/fixtures/native-addon-test/index.js
@@ -20,17 +20,17 @@ exports.dummyModule = require('./dir/dum
 
 exports.eventCore = require('sdk/event/core');
 exports.promise = require('sdk/core/promise');
 
 exports.localJSM  = require('./dir/test.jsm');
 exports.promisejsm = require('modules/Promise.jsm').Promise;
 exports.require = require;
 
-let math = require('test-math');
+var math = require('test-math');
 exports.areModulesCached = (math === exports.math);
 
 // Added noise to test AST walker
 function square (x) {
   let tmp = x;
   tmp *= x;
   return tmp;
 }
--- a/addon-sdk/source/test/test-addon-window.js
+++ b/addon-sdk/source/test/test-addon-window.js
@@ -1,14 +1,14 @@
 /* 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/. */
 'use strict';
 
-let { Loader } = require('sdk/test/loader');
+var { Loader } = require('sdk/test/loader');
 
 exports.testReady = function(assert, done) {
   let loader = Loader(module);
   let { ready, window } = loader.require('sdk/addon/window');
   let windowIsReady = false;
 
   ready.then(function() {
     assert.equal(windowIsReady, false, 'ready promise was resolved only once');
--- a/addon-sdk/source/test/test-chrome.js
+++ b/addon-sdk/source/test/test-chrome.js
@@ -1,14 +1,14 @@
 /* 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/. */
 'use strict';
 
-let chrome = require('chrome');
+var chrome = require('chrome');
 
 const FIXTURES_URL = module.uri.substr(0, module.uri.lastIndexOf('/') + 1) +
                      'fixtures/chrome-worker/'
 
 exports['test addEventListener'] = function(assert, done) {
   let uri = FIXTURES_URL + 'addEventListener.js';
 
   let worker = new chrome.ChromeWorker(uri);
--- a/addon-sdk/source/test/test-content-events.js
+++ b/addon-sdk/source/test/test-content-events.js
@@ -11,37 +11,37 @@ const { defer } = require("sdk/core/prom
 const { curry, identity, partial } = require("sdk/lang/functional");
 
 const { nuke } = require("sdk/loader/sandbox");
 
 const { open: openWindow, close: closeWindow } = require('sdk/window/helpers');
 
 const openBrowserWindow = partial(openWindow, null, {features: {toolbar: true}});
 
-let when = curry(function(options, tab) {
+var when = curry(function(options, tab) {
   let type = options.type || options;
   let capture = options.capture || false;
   let target = getBrowserForTab(tab);
   let { promise, resolve } = defer();
 
   target.addEventListener(type, function handler(event) {
     if (!event.target.defaultView.frameElement) {
       target.removeEventListener(type, handler, capture);
       resolve(tab);
     }
   }, capture);
 
   return promise;
 });
 
-let use = function(value) function() value;
+var use = function(value) function() value;
 
 
-let open = curry(function(url, window) openTab(window, url));
-let close = function(tab) {
+var open = curry(function(url, window) openTab(window, url));
+var close = function(tab) {
   let promise = when("pagehide", tab);
   closeTab(tab);
   return promise;
 }
 
 exports["test multiple tabs"] = function(assert, done) {
   let loader = Loader(module);
   let { events } = loader.require("sdk/content/events");
--- a/addon-sdk/source/test/test-content-script.js
+++ b/addon-sdk/source/test/test-content-script.js
@@ -87,17 +87,17 @@ function createWorker(assert, xrayWindow
     assert.ok(data.assertion, data.msg);
   });
 
   return worker;
 }
 
 /* Examples for the `createProxyTest` uses */
 
-let html = "<script>var documentGlobal = true</script>";
+var html = "<script>var documentGlobal = true</script>";
 
 exports["test Create Proxy Test"] = createProxyTest(html, function (helper, assert) {
   // You can get access to regular `test` object in second argument of
   // `createProxyTest` method:
   assert.ok(helper.rawWindow.documentGlobal,
               "You have access to a raw window reference via `helper.rawWindow`");
   assert.ok(!("documentGlobal" in helper.xrayWindow),
               "You have access to an XrayWrapper reference via `helper.xrayWindow`");
@@ -164,17 +164,17 @@ exports["test Shared To String Proxies"]
         done();
       }
     );
   });
 });
 */
 
 // Ensure that postMessage is working correctly across documents with an iframe
-let html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
+var html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
 exports["test postMessage"] = createProxyTest(html, function (helper, assert) {
   let ifWindow = helper.xrayWindow.document.getElementById("iframe").contentWindow;
   // Listen without proxies, to check that it will work in regular case
   // simulate listening from a web document.
   ifWindow.addEventListener("message", function listener(event) {
     ifWindow.removeEventListener("message", listener, false);
     // As we are in system principal, event is an XrayWrapper
     // xrays use current compartments when calling postMessage method.
@@ -194,17 +194,17 @@ exports["test postMessage"] = createProx
     'new ' + function ContentScriptScope() {
       var json = JSON.stringify({foo : "bar\n \"escaped\"."});
 
       document.getElementById("iframe").contentWindow.postMessage(json, "*");
     }
   );
 });
 
-let html = '<input id="input2" type="checkbox" />';
+var html = '<input id="input2" type="checkbox" />';
 exports["test Object Listener"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       // Test objects being given as event listener
       let input = document.getElementById("input2");
       let myClickListener = {
         called: false,
@@ -250,17 +250,17 @@ exports["test Object Listener 2"] = crea
 
       window.addEventListener("message", myMessageListener, true);
       document.defaultView.postMessage("ok", '*');
     }
   ).replace("TOKEN", testHost));
 
 });
 
-let html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
+var html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
              '<input id="input2" type="checkbox" />';
 
 exports.testStringOverload = createProxyTest(html, function (helper, assert) {
   // Proxy - toString error
   let originalString = "string";
   let p = Proxy.create({
     get: function(receiver, name) {
       if (name == "binded")
@@ -499,17 +499,17 @@ exports["test Document TagName"] = creat
       assert(document.test == img, "document[imgName] is valid");
       body.removeChild(img);
       done();
     }
   );
 
 });
 
-let html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
+var html = '<iframe id="iframe" name="test" src="data:text/html;charset=utf-8," />';
 exports["test Window Frames"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'let glob = this; new ' + function ContentScriptScope() {
       // Check window[frameName] and window.frames[i]
       let iframe = document.getElementById("iframe");
       //assert(window.frames.length == 1, "The iframe is reported in window.frames check1");
       //assert(window.frames[0] == iframe.contentWindow, "The iframe is reported in window.frames check2");
@@ -534,17 +534,17 @@ exports["test Collections"] = createProx
       assert(tds[0] == tds[0], "We can get array element multiple times");
       body.removeChild(div);
       done();
     }
   );
 
 });
 
-let html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
+var html = '<input id="input" type="text" /><input id="input3" type="checkbox" />' +
              '<input id="input2" type="checkbox" />';
 exports["test Collections 2"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       // Verify that NodeList/HTMLCollection are working fine
       let body = document.body;
       let inputs = body.getElementsByTagName("input");
@@ -651,17 +651,17 @@ exports["test Functions"] = createProxyT
       let closure = function () {};
       assert(window.wrappedJSObject.isEqual(closure, closure), "Function references are cached before being wrapped to native");
       done();
     }
   );
 
 });
 
-let html = '<input id="input2" type="checkbox" />';
+var html = '<input id="input2" type="checkbox" />';
 exports["test Listeners"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       // Verify listeners:
       let input = document.getElementById("input2");
       assert(input, "proxy.getElementById works");
 
@@ -785,17 +785,17 @@ exports["test Cross Domain Iframe"] = cr
     server.stop(helper.done);
   });
 
   worker.postMessage("http://localhost:" + serverPort + "/");
 
 });
 
 // Bug 769006: Ensure that MutationObserver works fine with proxies
-let html = '<a href="foo">link</a>';
+var html = '<a href="foo">link</a>';
 exports["test MutationObvserver"] = createProxyTest(html, function (helper) {
 
   helper.createWorker(
     'new ' + function ContentScriptScope() {
       if (typeof MutationObserver == "undefined") {
         assert(true, "No MutationObserver for this FF version");
         done();
         return;
@@ -823,17 +823,17 @@ exports["test MutationObvserver"] = crea
 
       // Modify the DOM
       link.setAttribute("href", "bar");
     }
   );
 
 });
 
-let html = '<script>' +
+var html = '<script>' +
   'var accessCheck = function() {' +
   '  assert(true, "exporting function works");' +
   '  try{' +
   '    exportedObj.prop;' +
   '    assert(false, "content should not have access to content-script");' +
   '  } catch(e) {' +
   '    assert(e.toString().indexOf("Permission denied") != -1,' +
   '           "content should not have access to content-script");' +
--- a/addon-sdk/source/test/test-host-events.js
+++ b/addon-sdk/source/test/test-host-events.js
@@ -6,17 +6,17 @@
 const { Cc, Ci } = require('chrome');
 const { defer, all } = require('sdk/core/promise');
 const { setTimeout } = require('sdk/timers');
 const { request, response } = require('sdk/addon/host');
 const { send } = require('sdk/addon/events');
 const { filter } = require('sdk/event/utils');
 const { on, emit, off } = require('sdk/event/core');
 
-let stream = filter(request, (data) => /sdk-x-test/.test(data.event));
+var stream = filter(request, (data) => /sdk-x-test/.test(data.event));
 
 exports.testSend = function (assert, done) {
   on(stream, 'data', handle);
   send('sdk-x-test-simple', { title: 'my test data' }).then((data) => {
     assert.equal(data.title, 'my response', 'response is handled');
     off(stream, 'data', handle);
     done();
   }, (reason) => {
--- a/addon-sdk/source/test/test-loader.js
+++ b/addon-sdk/source/test/test-loader.js
@@ -1,20 +1,20 @@
 /* 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/. */
 'use strict';
 
-let {
+var {
   Loader, main, unload, parseStack, generateMap, resolve, join,
   Require, Module
 } = require('toolkit/loader');
-let { readURI } = require('sdk/net/url');
+var { readURI } = require('sdk/net/url');
 
-let root = module.uri.substr(0, module.uri.lastIndexOf('/'));
+var root = module.uri.substr(0, module.uri.lastIndexOf('/'));
 
 const app = require('sdk/system/xul-app');
 
 // The following adds Debugger constructor to the global namespace.
 const { Cu } = require('chrome');
 const { addDebuggerToGlobal } = Cu.import('resource://gre/modules/jsdebugger.jsm', {});
 addDebuggerToGlobal(this);
 
--- a/addon-sdk/source/test/test-native-loader.js
+++ b/addon-sdk/source/test/test-native-loader.js
@@ -1,21 +1,21 @@
 /* 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/. */
 'use strict';
 
-let {
+var {
   Loader, main, unload, parseStack, generateMap, resolve, nodeResolve
 } = require('toolkit/loader');
-let { readURI } = require('sdk/net/url');
-let { all } = require('sdk/core/promise');
-let testOptions = require('@test/options');
+var { readURI } = require('sdk/net/url');
+var { all } = require('sdk/core/promise');
+var testOptions = require('@test/options');
 
-let root = module.uri.substr(0, module.uri.lastIndexOf('/'))
+var root = module.uri.substr(0, module.uri.lastIndexOf('/'))
 // The following adds Debugger constructor to the global namespace.
 const { Cu } = require('chrome');
 const { addDebuggerToGlobal } = Cu.import('resource://gre/modules/jsdebugger.jsm', {});
 addDebuggerToGlobal(this);
 
 
 exports['test nodeResolve'] = function (assert) {
   let rootURI = root + '/fixtures/native-addon-test/';
--- a/addon-sdk/source/test/test-node-os.js
+++ b/addon-sdk/source/test/test-node-os.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/. */
 "use strict";
 
-let os = require("node/os");
-let system = require("sdk/system");
+var os = require("node/os");
+var system = require("sdk/system");
 
 exports["test os"] = function (assert) {
   assert.equal(os.tmpdir(), system.pathFor("TmpD"), "os.tmpdir() matches temp dir");
   assert.ok(os.endianness() === "BE" || os.endianness() === "LE", "os.endianness is BE or LE");
 
   assert.ok(os.arch().length > 0, "os.arch() returns a value");
   assert.equal(typeof os.arch(), "string", "os.arch() returns a string");
   assert.ok(os.type().length > 0, "os.type() returns a value");
--- a/addon-sdk/source/test/test-object.js
+++ b/addon-sdk/source/test/test-object.js
@@ -1,16 +1,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/. */
 'use strict';
 
 const { merge, extend, has, each } = require('sdk/util/object');
 
-let o = {
+var o = {
   'paper': 0,
   'rock': 1,
   'scissors': 2
 };
 
 //exports.testMerge = function(assert) {}
 //exports.testExtend = function(assert) {}
 
--- a/addon-sdk/source/test/test-promise.js
+++ b/addon-sdk/source/test/test-promise.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 'use strict';
 
 const { Cc, Cu, Ci } = require('chrome');
 const { setTimeout } = require('sdk/timers');
 const { prefixURI, name } = require('@loader/options');
 const addonPromiseURI = prefixURI + name + '/lib/sdk/core/promise.js';
 const builtPromiseURI = 'resource://gre/modules/commonjs/sdk/core/promise.js';
-let { Promise, defer, resolve, reject, all, promised } = require('sdk/core/promise');
+var { Promise, defer, resolve, reject, all, promised } = require('sdk/core/promise');
 
 exports['test all observers are notified'] = function(assert, done) {
   let expected = 'Taram pam param!';
   let deferred = defer();
   let pending = 10, i = 0;
 
   function resolved(value) {
     assert.equal(value, expected, 'value resolved as expected: #' + pending);
--- a/addon-sdk/source/test/test-sequence.js
+++ b/addon-sdk/source/test/test-sequence.js
@@ -1,14 +1,14 @@
 /* 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/. */
 "use strict";
 
-let { seq, iterate, filter, map, reductions, reduce, count,
+var { seq, iterate, filter, map, reductions, reduce, count,
       isEmpty, every, isEvery, some, take, takeWhile, drop,
       dropWhile, concat, first, rest, nth, last, dropLast,
       distinct, remove, mapcat, fromEnumerator, string,
       object, pairs, keys, values, each, names, symbols
     } = require("sdk/util/sequence");
 
 const boom = () => { throw new Error("Boom!"); };
 const broken = seq(function*() {
--- a/addon-sdk/source/test/test-set-exports.js
+++ b/addon-sdk/source/test/test-set-exports.js
@@ -1,20 +1,20 @@
 /* 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/. */
 
-let four = require("./modules/exportsEquals");
+var four = require("./modules/exportsEquals");
 exports.testExportsEquals = function(assert) {
   assert.equal(four, 4);
 };
 
 /* TODO: Discuss idea of dropping support for this feature that was alternative
          to `module.exports = ..` that failed.
-let five = require("./modules/setExports");
+var five = require("./modules/setExports");
 exports.testSetExports = function(assert) {
   assert.equal(five, 5);
 }
 
 exports.testDupeSetExports = function(assert) {
   var passed = false;
   try {
     var dupe = require('./modules/dupeSetExports');
--- a/addon-sdk/source/test/test-simple-storage.js
+++ b/addon-sdk/source/test/test-simple-storage.js
@@ -2,30 +2,30 @@
  * 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/. */
 
 const file = require("sdk/io/file");
 const prefs = require("sdk/preferences/service");
 
 const QUOTA_PREF = "extensions.addon-sdk.simple-storage.quota";
 
-let {Cc,Ci} = require("chrome");
+var {Cc,Ci} = require("chrome");
 
 const { Loader } = require("sdk/test/loader");
 const { id } = require("sdk/self");
 
-let storeFile = Cc["@mozilla.org/file/directory_service;1"].
+var storeFile = Cc["@mozilla.org/file/directory_service;1"].
                 getService(Ci.nsIProperties).
                 get("ProfD", Ci.nsIFile);
 storeFile.append("jetpack");
 storeFile.append(id);
 storeFile.append("simple-storage");
 file.mkpath(storeFile.path);
 storeFile.append("store.json");
-let storeFilename = storeFile.path;
+var storeFilename = storeFile.path;
 
 function manager(loader) loader.sandbox("sdk/simple-storage").manager;
 
 exports.testSetGet = function (assert, done) {
   // Load the module once, set a value.
   let loader = Loader(module);
   let ss = loader.require("sdk/simple-storage");
   manager(loader).jsonStore.onWrite = function (storage) {
--- a/addon-sdk/source/test/test-system-events.js
+++ b/addon-sdk/source/test/test-system-events.js
@@ -5,17 +5,17 @@
 const events = require("sdk/system/events");
 const self = require("sdk/self");
 const { Cc, Ci, Cu } = require("chrome");
 const { setTimeout } = require("sdk/timers");
 const { Loader, LoaderWithHookedConsole2 } = require("sdk/test/loader");
 const nsIObserverService = Cc["@mozilla.org/observer-service;1"].
                            getService(Ci.nsIObserverService);
 
-let isConsoleEvent = (topic) =>
+var isConsoleEvent = (topic) =>
   !!~["console-api-log-event", "console-storage-cache-event"].indexOf(topic)
 
 exports["test basic"] = function(assert) {
   let type = Date.now().toString(32);
 
   let timesCalled = 0;
   function handler({subject, data}) { timesCalled++; };
 
--- a/addon-sdk/source/test/test-tab-events.js
+++ b/addon-sdk/source/test/test-tab-events.js
@@ -7,17 +7,17 @@
 const { Loader } = require("sdk/test/loader");
 const utils = require("sdk/tabs/utils");
 const { open, close } = require("sdk/window/helpers");
 const { getMostRecentBrowserWindow } = require("sdk/window/utils");
 const { events } = require("sdk/tab/events");
 const { on, off } = require("sdk/event/core");
 const { resolve, defer } = require("sdk/core/promise");
 
-let isFennec = require("sdk/system/xul-app").is("Fennec");
+var isFennec = require("sdk/system/xul-app").is("Fennec");
 
 function test(options) {
   return function(assert, done) {
     let tabEvents = [];
     let tabs = [];
     let { promise, resolve: resolveP } = defer();
     let win = isFennec ? resolve(getMostRecentBrowserWindow()) :
       open(null, {
--- a/addon-sdk/source/test/test-test-utils-async.js
+++ b/addon-sdk/source/test/test-test-utils-async.js
@@ -2,18 +2,18 @@
  * 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/. */
 'use strict';
 
 const { defer: async } = require('sdk/lang/functional');
 const { before, after } = require('sdk/test/utils');
 const { resolve } = require('sdk/core/promise');
 
-let AFTER_RUN = 0;
-let BEFORE_RUN = 0;
+var AFTER_RUN = 0;
+var BEFORE_RUN = 0;
 
 /*
  * Tests are dependent on ordering, as the before and after functions
  * are called outside of each test, and sometimes checked in the next test
  * (like in the `after` tests)
  */
 exports.testABeforeAsync = function (assert, done) {
   assert.equal(BEFORE_RUN, 1, 'before function was called');
--- a/addon-sdk/source/test/test-test-utils-generator.js
+++ b/addon-sdk/source/test/test-test-utils-generator.js
@@ -6,18 +6,18 @@
 // NOTE: this test is explictly testing non-normal,
 //       generator functions.
 
 
 const { defer: async } = require('sdk/lang/functional');
 const { before, after } = require('sdk/test/utils');
 const { resolve } = require("sdk/core/promise");
 
-let AFTER_RUN = 0;
-let BEFORE_RUN = 0;
+var AFTER_RUN = 0;
+var BEFORE_RUN = 0;
 
 /*
  * Tests are dependent on ordering, as the before and after functions
  * are called outside of each test, and sometimes checked in the next test
  * (like in the `after` tests)
  */
 exports.testABeforeAsync = function (assert, done) {
   assert.equal(BEFORE_RUN, 1, 'before function was called');
--- a/addon-sdk/source/test/test-test-utils-sync.js
+++ b/addon-sdk/source/test/test-test-utils-sync.js
@@ -2,18 +2,18 @@
  * 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/. */
 'use strict';
 
 const { defer: async } = require('sdk/lang/functional');
 const { before, after } = require('sdk/test/utils');
 const { resolve } = require('sdk/core/promise');
 
-let AFTER_RUN = 0;
-let BEFORE_RUN = 0;
+var AFTER_RUN = 0;
+var BEFORE_RUN = 0;
 
 /*
  * Tests are dependent on ordering, as the before and after functions
  * are called outside of each test, and sometimes checked in the next test
  * (like in the `after` tests)
  */
 exports.testABeforeAsync = function (assert, done) {
   assert.equal(BEFORE_RUN, 1, 'before function was called');
--- a/addon-sdk/test/head.js
+++ b/addon-sdk/test/head.js
@@ -1,27 +1,27 @@
 /* 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/. */
 
 const { utils: Cu } = Components;
 const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
 const LoaderModule = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {}).Loader;
 const { console } = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
-let {
+var {
   Loader, main, Module, Require, unload
 } = LoaderModule;
 
-let CURRENT_DIR = gTestPath.replace(/\/[^\/]*\.js$/,'/');
-let loaders = [];
+var CURRENT_DIR = gTestPath.replace(/\/[^\/]*\.js$/,'/');
+var loaders = [];
 
 // All tests are asynchronous.
 waitForExplicitFinish();
 
-let gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
+var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
 Services.prefs.setBoolPref("devtools.debugger.log", true);
 
 registerCleanupFunction(() => {
   info("finish() was called, cleaning up...");
   loaders.forEach(unload);
   Services.prefs.setBoolPref("devtools.debugger.log", gEnableLogging);
 });
 
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -221,20 +221,16 @@ pref("content.sink.perf_parse_time", 500
 pref("dom.use_watchdog", false);
 
 // The slow script dialog can be triggered from inside the JS engine as well,
 // ensure that those calls don't accidentally trigger the dialog.
 pref("dom.max_script_run_time", 0);
 pref("dom.max_chrome_script_run_time", 0);
 pref("dom.max_child_script_run_time", 0);
 
-// Temporarily disable support for offsetX/Y to work around Google Maps bug
-// (bug 1150284)
-pref("dom.mouseEvent.offsetXY.enabled", false);
-
 // plugins
 pref("plugin.disable", true);
 pref("dom.ipc.plugins.enabled", true);
 
 // product URLs
 // The breakpad report server to link to in about:crashes
 pref("breakpad.reportURL", "https://crash-stats.mozilla.com/report/index/");
 pref("app.releaseNotesURL", "http://www.mozilla.com/%LOCALE%/b2g/%VERSION%/releasenotes/");
--- a/b2g/chrome/content/ErrorPage.js
+++ b/b2g/chrome/content/ErrorPage.js
@@ -1,21 +1,21 @@
 /* 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/. */
 
 'use strict';
 
-let Cu = Components.utils;
-let Cc = Components.classes;
-let Ci = Components.interfaces;
+var Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
 
 dump("############ ErrorPage.js\n");
 
-let ErrorPageHandler = {
+var ErrorPageHandler = {
   _reload: function() {
     docShell.QueryInterface(Ci.nsIWebNavigation).reload(Ci.nsIWebNavigation.LOAD_FLAGS_NONE);
   },
 
   _certErrorPageEventHandler: function(e) {
     let target = e.originalTarget;
     let errorDoc = target.ownerDocument;
 
--- a/b2g/chrome/content/desktop.js
+++ b/b2g/chrome/content/desktop.js
@@ -1,14 +1,14 @@
 /* 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/. */
 
-let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
-let isMulet = "ResponsiveUI" in browserWindow;
+var browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
+var isMulet = "ResponsiveUI" in browserWindow;
 
 // Enable touch event shim on desktop that translates mouse events
 // into touch ones
 function enableTouch() {
   let require = Cu.import('resource://gre/modules/devtools/Loader.jsm', {})
                   .devtools.require;
   let { TouchEventSimulator } = require('devtools/toolkit/touch/simulator');
   let touchEventSimulator = new TouchEventSimulator(shell.contentBrowser);
--- a/b2g/chrome/content/devtools/adb.js
+++ b/b2g/chrome/content/devtools/adb.js
@@ -10,17 +10,17 @@
 
 Components.utils.import("resource://gre/modules/FileUtils.jsm");
 
 const DEBUG = false;
 var debug = function(str) {
   dump("AdbController: " + str + "\n");
 }
 
-let AdbController = {
+var AdbController = {
   locked: undefined,
   remoteDebuggerEnabled: undefined,
   lockEnabled: undefined,
   disableAdbTimer: null,
   disableAdbTimeoutHours: 12,
   umsActive: false,
 
   setLockscreenEnabled: function(value) {
--- a/b2g/chrome/content/devtools/debugger.js
+++ b/b2g/chrome/content/devtools/debugger.js
@@ -23,17 +23,17 @@ XPCOMUtils.defineLazyGetter(this, "B2GTa
   return B2GTabList;
 });
 
 // Load the discovery module eagerly, so that it can set a device name at
 // startup.  This does not cause discovery to start listening for packets, as
 // that only happens once DevTools is enabled.
 devtools.require("devtools/toolkit/discovery/discovery");
 
-let RemoteDebugger = {
+var RemoteDebugger = {
   _listening: false,
 
   /**
    * Prompt the user to accept or decline the incoming connection.
    *
    * @param session object
    *        The session object will contain at least the following fields:
    *        {
@@ -227,17 +227,17 @@ let RemoteDebugger = {
   }
 };
 
 RemoteDebugger.allowConnection =
   RemoteDebugger.allowConnection.bind(RemoteDebugger);
 RemoteDebugger.receiveOOB =
   RemoteDebugger.receiveOOB.bind(RemoteDebugger);
 
-let USBRemoteDebugger = {
+var USBRemoteDebugger = {
 
   get isDebugging() {
     if (!this._listener) {
       return false;
     }
 
     return DebuggerServer._connections &&
            Object.keys(DebuggerServer._connections).length > 0;
@@ -281,17 +281,17 @@ let USBRemoteDebugger = {
       this._listener = null;
     } catch (e) {
       debug("Unable to stop USB debugger server: " + e);
     }
   }
 
 };
 
-let WiFiRemoteDebugger = {
+var WiFiRemoteDebugger = {
 
   start: function() {
     if (this._listener) {
       return;
     }
 
     RemoteDebugger.initServer();
 
--- a/b2g/chrome/content/devtools/hud.js
+++ b/b2g/chrome/content/devtools/hud.js
@@ -31,31 +31,31 @@ XPCOMUtils.defineLazyGetter(this, 'Perfo
 });
 
 XPCOMUtils.defineLazyGetter(this, 'MemoryFront', function() {
   return devtools.require('devtools/server/actors/memory').MemoryFront;
 });
 
 Cu.import('resource://gre/modules/Frames.jsm');
 
-let _telemetryDebug = true;
+var _telemetryDebug = true;
 
 function telemetryDebug(...args) {
   if (_telemetryDebug) {
     args.unshift('[AdvancedTelemetry]');
     console.log(...args);
   }
 }
 
 /**
  * The Developer HUD is an on-device developer tool that displays widgets,
  * showing visual debug information about apps. Each widget corresponds to a
  * metric as tracked by a metric watcher (e.g. consoleWatcher).
  */
-let developerHUD = {
+var developerHUD = {
 
   _targets: new Map(),
   _histograms: new Set(),
   _customHistograms: new Set(),
   _client: null,
   _conn: null,
   _watchers: [],
   _logging: true,
@@ -428,17 +428,17 @@ Target.prototype = {
   }
 };
 
 
 /**
  * The Console Watcher tracks the following metrics in apps: reflows, warnings,
  * and errors, with security errors reported separately.
  */
-let consoleWatcher = {
+var consoleWatcher = {
 
   _client: null,
   _targets: new Map(),
   _watching: {
     reflows: false,
     warnings: false,
     errors: false,
     security: false
@@ -690,17 +690,17 @@ let consoleWatcher = {
       metric.custom = true;
       target._logHistogram(metric);
     }
   }
 };
 developerHUD.registerWatcher(consoleWatcher);
 
 
-let eventLoopLagWatcher = {
+var eventLoopLagWatcher = {
   _client: null,
   _fronts: new Map(),
   _active: false,
 
   init(client) {
     this._client = client;
 
     SettingsListener.observe('hud.jank', false, this.settingsListener.bind(this));
@@ -755,17 +755,17 @@ developerHUD.registerWatcher(eventLoopLa
  * of an app's launch time and the app's performance entry marks.
  * When it receives an "appLaunch" performance entry mark it records the
  * name of the app being launched and the epoch of when the launch ocurred.
  * When it receives subsequent performance entry events for the app being
  * launched, it records the delta of the performance entry opoch compared
  * to the app-launch epoch and emits an "app-start-time-<performance mark name>"
  * event containing the delta.
  */
-let performanceEntriesWatcher = {
+var performanceEntriesWatcher = {
   _client: null,
   _fronts: new Map(),
   _appLaunchName: null,
   _appLaunchStartTime: null,
   _supported: [
     'contentInteractive',
     'navigationInteractive',
     'navigationLoaded',
@@ -860,17 +860,17 @@ let performanceEntriesWatcher = {
     }
   }
 };
 developerHUD.registerWatcher(performanceEntriesWatcher);
 
 /**
  * The Memory Watcher uses devtools actors to track memory usage.
  */
-let memoryWatcher = {
+var memoryWatcher = {
 
   _client: null,
   _fronts: new Map(),
   _timers: new Map(),
   _watching: {
     uss: false,
     appmemory: false,
     jsobjects: false,
--- a/b2g/chrome/content/identity.js
+++ b/b2g/chrome/content/identity.js
@@ -4,17 +4,17 @@
  * 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 JS shim contains the callbacks to fire DOMRequest events for
 // navigator.pay API within the payment processor's scope.
 
 "use strict";
 
-let { classes: Cc, interfaces: Ci, utils: Cu }  = Components;
+var { classes: Cc, interfaces: Ci, utils: Cu }  = Components;
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
                                    "@mozilla.org/childprocessmessagemanager;1",
                                    "nsIMessageSender");
 
 XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
--- a/b2g/chrome/content/runapp.js
+++ b/b2g/chrome/content/runapp.js
@@ -1,14 +1,14 @@
 "use strict";
 
 // runapp.js:
 // Provide a --runapp APPNAME command-line option.
 
-let runAppObj;
+var runAppObj;
 window.addEventListener('load', function() {
   // Get the command line arguments that were passed to the b2g client
   let args;
   try {
     let service = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"].getService(Ci.nsISupports);
     args = service.wrappedJSObject.cmdLine;
   } catch(e) {}
 
--- a/b2g/chrome/content/screen.js
+++ b/b2g/chrome/content/screen.js
@@ -1,17 +1,17 @@
 // screen.js:
 // Set the screen size, pixel density and scaling of the b2g client screen
 // based on the --screen command-line option, if there is one.
 // 
 // TODO: support multiple device pixels per CSS pixel
 // 
 
-let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
-let isMulet = "ResponsiveUI" in browserWindow;
+var browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
+var isMulet = "ResponsiveUI" in browserWindow;
 Cu.import("resource://gre/modules/GlobalSimulatorScreen.jsm");
 
 window.addEventListener('ContentStart', onStart);
 window.addEventListener('SafeModeStart', onStart);
 
 // We do this on ContentStart and SafeModeStart because querying the
 // displayDPI fails otherwise.
 function onStart() {
--- a/b2g/chrome/content/settings.js
+++ b/b2g/chrome/content/settings.js
@@ -182,17 +182,17 @@ Components.utils.import('resource://gre/
       'deviceinfo.product_device': product_device
     }
     lock.set(setting);
   }
 })();
 
 // =================== DevTools ====================
 
-let developerHUD;
+var developerHUD;
 SettingsListener.observe('devtools.overlay', false, (value) => {
   if (value) {
     if (!developerHUD) {
       let scope = {};
       Services.scriptloader.loadSubScript('chrome://b2g/content/devtools/hud.js', scope);
       developerHUD = scope.developerHUD;
     }
     developerHUD.init();
@@ -200,17 +200,17 @@ SettingsListener.observe('devtools.overl
     if (developerHUD) {
       developerHUD.uninit();
     }
   }
 });
 
 #ifdef MOZ_WIDGET_GONK
 
-let LogShake;
+var LogShake;
 (function() {
   let scope = {};
   Cu.import('resource://gre/modules/LogShake.jsm', scope);
   LogShake = scope.LogShake;
   LogShake.init();
 })();
 
 SettingsListener.observe('devtools.logshake.enabled', false, value => {
@@ -533,17 +533,17 @@ SettingsListener.observe("theme.selected
     Services.prefs.setIntPref('network.proxy.browsing.port', value);
     setPAC();
   });
 
   setPAC();
 })();
 
 // =================== Various simple mapping  ======================
-let settingsToObserve = {
+var settingsToObserve = {
   'accessibility.screenreader_quicknav_modes': {
     prefName: 'accessibility.accessfu.quicknav_modes',
     resetToPref: true,
     defaultValue: ''
   },
   'accessibility.screenreader_quicknav_index': {
     prefName: 'accessibility.accessfu.quicknav_index',
     resetToPref: true,
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -747,23 +747,23 @@ Services.obs.addObserver(function onBlue
     value: data
   });
 }, 'bluetooth-volume-change', false);
 
 Services.obs.addObserver(function(subject, topic, data) {
   shell.sendCustomEvent('mozmemorypressure');
 }, 'memory-pressure', false);
 
-let permissionMap = new Map([
+var permissionMap = new Map([
   ['unknown', Services.perms.UNKNOWN_ACTION],
   ['allow', Services.perms.ALLOW_ACTION],
   ['deny', Services.perms.DENY_ACTION],
   ['prompt', Services.perms.PROMPT_ACTION],
 ]);
-let permissionMapRev = new Map(Array.from(permissionMap.entries()).reverse());
+var permissionMapRev = new Map(Array.from(permissionMap.entries()).reverse());
 
 var CustomEventManager = {
   init: function custevt_init() {
     window.addEventListener("ContentStart", (function(evt) {
       let content = shell.contentBrowser.contentWindow;
       content.addEventListener("mozContentEvent", this, false, true);
     }).bind(this), false);
   },
@@ -820,17 +820,17 @@ var CustomEventManager = {
         if (result !== permissionMapRev.get(detail.permission)) {
           evt.preventDefault();
         }
         break;
     }
   }
 }
 
-let DoCommandHelper = {
+var DoCommandHelper = {
   _event: null,
   setEvent: function docommand_setEvent(evt) {
     this._event = evt;
   },
 
   handleEvent: function docommand_handleEvent(cmd) {
     if (this._event) {
       Services.obs.notifyObservers({ wrappedJSObject: this._event.target },
@@ -921,33 +921,33 @@ var WebappsHelper = {
         shell.sendCustomEvent("webapps-close", {
           "manifestURL": json.manifestURL
         });
         break;
     }
   }
 }
 
-let KeyboardHelper = {
+var KeyboardHelper = {
   handleEvent: function keyboard_handleEvent(detail) {
     switch (detail.type) {
       case 'inputmethod-update-layouts':
         Keyboard.setLayouts(detail.layouts);
 
         break;
       case 'inputregistry-add':
       case 'inputregistry-remove':
         Keyboard.inputRegistryGlue.returnMessage(detail);
 
         break;
     }
   }
 };
 
-let SystemAppMozBrowserHelper = {
+var SystemAppMozBrowserHelper = {
   handleEvent: function systemAppMozBrowser_handleEvent(detail) {
     let request;
     let name;
     switch (detail.type) {
       case 'system-audiochannel-list':
         let audioChannels = [];
         shell.allowedAudioChannels.forEach(function(value, name) {
           audioChannels.push(name);
--- a/b2g/components/AlertsHelper.jsm
+++ b/b2g/components/AlertsHelper.jsm
@@ -62,17 +62,17 @@ const kMessageAlertNotificationSend  = "
 const kMessageAlertNotificationClose = "alert-notification-close";
 
 const kMessages = [
   kMessageAppNotificationSend,
   kMessageAlertNotificationSend,
   kMessageAlertNotificationClose
 ];
 
-let AlertsHelper = {
+var AlertsHelper = {
 
   _listeners: {},
 
   init: function() {
     Services.obs.addObserver(this, "xpcom-shutdown", false);
     for (let message of kMessages) {
       ppmm.addMessageListener(message, this);
     }
--- a/b2g/components/B2GAboutRedirector.js
+++ b/b2g/components/B2GAboutRedirector.js
@@ -14,17 +14,17 @@ function debug(msg) {
 function netErrorURL() {
   let systemManifestURL = Services.prefs.getCharPref("b2g.system_manifest_url");
   systemManifestURL = Services.io.newURI(systemManifestURL, null, null);
   let netErrorURL = Services.prefs.getCharPref("b2g.neterror.url");
   netErrorURL = Services.io.newURI(netErrorURL, null, systemManifestURL);
   return netErrorURL.spec;
 }
 
-let modules = {
+var modules = {
   certerror: {
     uri: "chrome://b2g/content/aboutCertError.xhtml",
     privileged: false,
     hide: true
   },
   neterror: {
     uri: netErrorURL(),
     privileged: false,
--- a/b2g/components/ContentPermissionPrompt.js
+++ b/b2g/components/ContentPermissionPrompt.js
@@ -27,17 +27,17 @@ Cu.import("resource://gre/modules/Servic
 Cu.import("resource://gre/modules/Webapps.jsm");
 Cu.import("resource://gre/modules/AppsUtils.jsm");
 Cu.import("resource://gre/modules/PermissionsInstaller.jsm");
 Cu.import("resource://gre/modules/PermissionsTable.jsm");
 
 var permissionManager = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
 var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
 
-let permissionSpecificChecker = {};
+var permissionSpecificChecker = {};
 
 XPCOMUtils.defineLazyServiceGetter(this,
                                    "TelephonyService",
                                    "@mozilla.org/telephony/telephonyservice;1",
                                    "nsITelephonyService");
 
 XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
                                   "resource://gre/modules/SystemAppProxy.jsm");
--- a/b2g/components/DirectoryProvider.js
+++ b/b2g/components/DirectoryProvider.js
@@ -36,17 +36,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
 XPCOMUtils.defineLazyGetter(this, "gExtStorage", function dp_gExtStorage() {
     return Services.env.get("EXTERNAL_STORAGE");
 });
 
 // This exists to mark the affected code for bug 828858.
 const gUseSDCard = true;
 
 const VERBOSE = 1;
-let log =
+var log =
   VERBOSE ?
   function log_dump(msg) { dump("DirectoryProvider: " + msg + "\n"); } :
   function log_noop(msg) { };
 
 function DirectoryProvider() {
 }
 
 DirectoryProvider.prototype = {
--- a/b2g/components/ErrorPage.jsm
+++ b/b2g/components/ErrorPage.jsm
@@ -127,17 +127,17 @@ SSLExceptions.prototype = {
    * the given URL.
    */
   addException: function SSLE_addException(aTemporary) {
     this._temporary = aTemporary;
     this._checkCert();
   }
 };
 
-let ErrorPage = {
+var ErrorPage = {
   _addCertException: function(aMessage) {
     let frameLoaderOwner = aMessage.target.QueryInterface(Ci.nsIFrameLoaderOwner);
     let win = frameLoaderOwner.ownerDocument.defaultView;
     let mm = frameLoaderOwner.frameLoader.messageManager;
 
     let uri = Services.io.newURI(aMessage.data.url, null, null);
     let sslExceptions = new SSLExceptions((function() {
       mm.sendAsyncMessage('ErrorPage:ReloadPage');
--- a/b2g/components/Frames.jsm
+++ b/b2g/components/Frames.jsm
@@ -112,17 +112,17 @@ const Observer = {
         dump('Exception while calling Frames.jsm listener:' + e + '\n' +
              e.stack + '\n');
       }
     });
   }
 
 };
 
-let Frames = this.Frames = {
+var Frames = this.Frames = {
 
   list: () => SystemAppProxy.getFrames(),
 
   addObserver: function (listener) {
     if (listeners.indexOf(listener) !== -1) {
       return;
     }
 
--- a/b2g/components/KillSwitchMain.jsm
+++ b/b2g/components/KillSwitchMain.jsm
@@ -50,17 +50,17 @@ const kMessages = [kEnableKillSwitch, kD
 
 const kXpcomShutdownObserverTopic = "xpcom-shutdown";
 
 const kProperty = "persist.moz.killswitch";
 
 const kUserValues =
   OS.Path.join(OS.Constants.Path.profileDir, "killswitch.json");
 
-let inParent = Cc["@mozilla.org/xre/app-info;1"]
+var inParent = Cc["@mozilla.org/xre/app-info;1"]
                  .getService(Ci.nsIXULRuntime)
                  .processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 
 function debug(aStr) {
   dump("--*-- KillSwitchMain: " + aStr + "\n");
 }
 
 this.KillSwitchMain = {
--- a/b2g/components/LogCapture.jsm
+++ b/b2g/components/LogCapture.jsm
@@ -19,17 +19,17 @@ this.EXPORTED_SYMBOLS = ["LogCapture"];
 
 const SYSTEM_PROPERTY_KEY_MAX = 32;
 const SYSTEM_PROPERTY_VALUE_MAX = 92;
 
 function debug(msg) {
   dump("LogCapture.jsm: " + msg + "\n");
 }
 
-let LogCapture = {
+var LogCapture = {
   ensureLoaded: function() {
     if (!this.ctypes) {
       this.load();
     }
   },
 
   load: function() {
     // load in everything on first use
--- a/b2g/components/LogShake.jsm
+++ b/b2g/components/LogShake.jsm
@@ -69,17 +69,17 @@ const EXCITEMENT_THRESHOLD = 500;
 const EXCITEMENT_FILTER_ALPHA = 0.2;
 const DEVICE_MOTION_EVENT = "devicemotion";
 const SCREEN_CHANGE_EVENT = "screenchange";
 const CAPTURE_LOGS_CONTENT_EVENT = "requestSystemLogs";
 const CAPTURE_LOGS_START_EVENT = "capture-logs-start";
 const CAPTURE_LOGS_ERROR_EVENT = "capture-logs-error";
 const CAPTURE_LOGS_SUCCESS_EVENT = "capture-logs-success";
 
-let LogShake = {
+var LogShake = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
   /**
    * If LogShake is in QA Mode, which bundles all files into a compressed archive
    */
   qaModeEnabled: false,
 
   /**
--- a/b2g/components/OrientationChangeHandler.jsm
+++ b/b2g/components/OrientationChangeHandler.jsm
@@ -4,20 +4,20 @@
 
 "use strict";
 
 this.EXPORTED_SYMBOLS = [];
 
 const Cu = Components.utils;
 Cu.import("resource://gre/modules/Services.jsm");
 
-let window = Services.wm.getMostRecentWindow("navigator:browser");
-let system = window.document.getElementById("systemapp");
+var window = Services.wm.getMostRecentWindow("navigator:browser");
+var system = window.document.getElementById("systemapp");
 
-let OrientationChangeHandler = {
+var OrientationChangeHandler = {
   // Clockwise orientations, looping
   orientations: ["portrait-primary", "landscape-secondary",
                  "portrait-secondary", "landscape-primary",
                  "portrait-primary"],
 
   lastOrientation: "portrait-primary",
 
   init: function() {
--- a/b2g/components/PaymentProviderStrategy.js
+++ b/b2g/components/PaymentProviderStrategy.js
@@ -22,17 +22,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
 XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService",
                                    "@mozilla.org/settingsService;1",
                                    "nsISettingsService");
 
 const kMozSettingsChangedObserverTopic = "mozsettings-changed";
 const kRilDefaultDataServiceId = "ril.data.defaultServiceId";
 const kRilDefaultPaymentServiceId = "ril.payment.defaultServiceId";
 
-let _debug;
+var _debug;
 try {
   _debug = Services.prefs.getPrefType(PREF_DEBUG) == Ci.nsIPrefBranch.PREF_BOOL
            && Services.prefs.getBoolPref(PREF_DEBUG);
 } catch(e){
   _debug = false;
 }
 
 function LOG(s) {
--- a/b2g/components/RecoveryService.js
+++ b/b2g/components/RecoveryService.js
@@ -13,17 +13,17 @@ Cu.import("resource://gre/modules/ctypes
 const RECOVERYSERVICE_CID = Components.ID("{b3caca5d-0bb0-48c6-912b-6be6cbf08832}");
 const RECOVERYSERVICE_CONTRACTID = "@mozilla.org/recovery-service;1";
 
 function log(msg) {
   dump("-*- RecoveryService: " + msg + "\n");
 }
 
 #ifdef MOZ_WIDGET_GONK
-let librecovery = (function() {
+var librecovery = (function() {
   let library;
   try {
     library = ctypes.open("librecovery.so");
   } catch (e) {
     log("Unable to open librecovery.so");
     throw Cr.NS_ERROR_FAILURE;
   }
   // Bug 1163956, modify updatePath from ctyps.char.ptr to ctype.char.array(4096)
--- a/b2g/components/Screenshot.jsm
+++ b/b2g/components/Screenshot.jsm
@@ -7,17 +7,17 @@
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 
 XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy", "resource://gre/modules/SystemAppProxy.jsm");
 
 this.EXPORTED_SYMBOLS = ['Screenshot'];
 
-let Screenshot = {
+var Screenshot = {
   get: function screenshot_get() {
     let systemAppFrame = SystemAppProxy.getFrame();
     let window = systemAppFrame.ownerDocument.defaultView;
     let document = window.document;
 
     var canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
     var docRect = document.body.getBoundingClientRect();
     var width = docRect.width;
--- a/b2g/components/SignInToWebsite.jsm
+++ b/b2g/components/SignInToWebsite.jsm
@@ -89,17 +89,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
                                   "resource://gre/modules/SystemAppProxy.jsm");
 
 // The default persona uri; can be overwritten with toolkit.identity.uri pref.
 // Do this if you want to repoint to a different service for testing.
 // There's no point in setting up an observer to monitor the pref, as b2g prefs
 // can only be overwritten when the profie is recreated.  So just get the value
 // on start-up.
-let kPersonaUri = "https://firefoxos.persona.org";
+var kPersonaUri = "https://firefoxos.persona.org";
 try {
   kPersonaUri = Services.prefs.getCharPref("toolkit.identity.uri");
 } catch(noSuchPref) {
   // stick with the default value
 }
 
 // JS shim that contains the callback functions that
 // live within the identity UI provisioning frame.
--- a/b2g/components/SimulatorScreen.js
+++ b/b2g/components/SimulatorScreen.js
@@ -1,23 +1,23 @@
 /* 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/. */
 
-let Ci = Components.interfaces;
-let Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 Cu.import('resource://gre/modules/Services.jsm');
 Cu.import('resource://gre/modules/DOMRequestHelper.jsm');
 
 XPCOMUtils.defineLazyModuleGetter(this, 'GlobalSimulatorScreen',
                                   'resource://gre/modules/GlobalSimulatorScreen.jsm');
 
-let DEBUG_PREFIX = 'SimulatorScreen.js - ';
+var DEBUG_PREFIX = 'SimulatorScreen.js - ';
 function debug() {
   //dump(DEBUG_PREFIX + Array.slice(arguments) + '\n');
 }
 
 function fireOrientationEvent(window) {
   let e = new window.Event('mozorientationchange');
   window.screen.dispatchEvent(e);
 }
--- a/b2g/components/SystemAppProxy.jsm
+++ b/b2g/components/SystemAppProxy.jsm
@@ -6,17 +6,17 @@
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 Cu.import('resource://gre/modules/Services.jsm');
 
 this.EXPORTED_SYMBOLS = ['SystemAppProxy'];
 
-let SystemAppProxy = {
+var SystemAppProxy = {
   _frame: null,
   _isReady: false,
   _pendingEvents: [],
   _pendingListeners: [],
 
   // To call when a new system app iframe is created
   registerFrame: function (frame) {
     this._isReady = false;
--- a/b2g/components/UpdatePrompt.js
+++ b/b2g/components/UpdatePrompt.js
@@ -10,17 +10,17 @@ const Ci = Components.interfaces;
 const Cu = Components.utils;
 const Cr = Components.results;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/WebappsUpdater.jsm");
 
 const VERBOSE = 1;
-let log =
+var log =
   VERBOSE ?
   function log_dump(msg) { dump("UpdatePrompt: "+ msg +"\n"); } :
   function log_noop(msg) { };
 
 const PREF_APPLY_PROMPT_TIMEOUT          = "b2g.update.apply-prompt-timeout";
 const PREF_APPLY_IDLE_TIMEOUT            = "b2g.update.apply-idle-timeout";
 const PREF_DOWNLOAD_WATCHDOG_TIMEOUT     = "b2g.update.download-watchdog-timeout";
 const PREF_DOWNLOAD_WATCHDOG_MAX_RETRIES = "b2g.update.download-watchdog-max-retries";
--- a/b2g/components/test/mochitest/file_loadserver.js
+++ b/b2g/components/test/mochitest/file_loadserver.js
@@ -1,14 +1,14 @@
-let Ci = Components.interfaces;
-let Cc = Components.classes;
-let Cu = Components.utils;
+var Ci = Components.interfaces;
+var Cc = Components.classes;
+var Cu = Components.utils;
 
 // Stolen from SpecialPowers, since at this point we don't know we're in a test.
-let isMainProcess = function() {
+var isMainProcess = function() {
   try {
     return Cc["@mozilla.org/xre/app-info;1"]
              .getService(Ci.nsIXULRuntime)
              .processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
   } catch (e) { }
   return true;
 };
 
--- a/b2g/components/test/mochitest/filepicker_path_handler_chrome.js
+++ b/b2g/components/test/mochitest/filepicker_path_handler_chrome.js
@@ -3,20 +3,20 @@
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 'use strict';
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 
 // use ppmm to handle file-picker message.
-let ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1']
+var ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1']
              .getService(Ci.nsIMessageListenerManager);
 
-let pickResult = null;
+var pickResult = null;
 
 function processPickMessage(message) {
   let sender = message.target.QueryInterface(Ci.nsIMessageSender);
   // reply FilePicker's message
   sender.sendAsyncMessage('file-picked', pickResult);
   // notify caller
   sendAsyncMessage('file-picked-posted', { type: 'file-picked-posted' });
 }
--- a/b2g/components/test/mochitest/permission_handler_chrome.js
+++ b/b2g/components/test/mochitest/permission_handler_chrome.js
@@ -10,17 +10,17 @@ function debug(str) {
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 const { SystemAppProxy } = Cu.import("resource://gre/modules/SystemAppProxy.jsm");
 
-let eventHandler = function(evt) {
+var eventHandler = function(evt) {
   if (!evt.detail || evt.detail.type !== "permission-prompt") {
     return;
   }
 
   sendAsyncMessage("permission-request", evt.detail);
 };
 
 SystemAppProxy.addEventListener("mozChromeEvent", eventHandler);
--- a/b2g/components/test/mochitest/presentation_prompt_handler_chrome.js
+++ b/b2g/components/test/mochitest/presentation_prompt_handler_chrome.js
@@ -60,17 +60,17 @@ TestPresentationRequest.prototype = {
 var testDevice = null;
 
 addMessageListener('setup', function(device_options) {
   testDevice = new TestPresentationDevice(device_options);
   manager.QueryInterface(Ci.nsIPresentationDeviceListener).addDevice(testDevice);
   sendAsyncMessage('setup-complete');
 });
 
-let eventHandler = function(evt) {
+var eventHandler = function(evt) {
   if (!evt.detail || evt.detail.type !== 'presentation-select-device') {
     return;
   }
 
   sendAsyncMessage('presentation-select-device', evt.detail);
 };
 
 SystemAppProxy.addEventListener('mozChromeEvent', eventHandler);
--- a/b2g/components/test/mochitest/screenshot_helper.js
+++ b/b2g/components/test/mochitest/screenshot_helper.js
@@ -1,35 +1,35 @@
 const Cu = Components.utils;
 const Ci = Components.interfaces;
 
 Cu.importGlobalProperties(['File']);
 
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 
 // Load a duplicated copy of the jsm to prevent messing with the currently running one
-let scope = {};
+var scope = {};
 Services.scriptloader.loadSubScript("resource://gre/modules/Screenshot.jsm", scope);
 const { Screenshot } = scope;
 
-let index = -1;
+var index = -1;
 function next() {
   index++;
   if (index >= steps.length) {
     assert.ok(false, "Shouldn't get here!");
     return;
   }
   try {
     steps[index]();
   } catch(ex) {
     assert.ok(false, "Caught exception: " + ex);
   }
 }
 
-let steps = [
+var steps = [
   function getScreenshot() {
     let screenshot = Screenshot.get();
     assert.ok(screenshot instanceof File,
               "Screenshot.get() returns a File");
     next();
   },
 
   function endOfTest() {
--- a/b2g/components/test/mochitest/systemapp_helper.js
+++ b/b2g/components/test/mochitest/systemapp_helper.js
@@ -1,38 +1,38 @@
 const Cu = Components.utils;
 
 const { Services } = Cu.import("resource://gre/modules/Services.jsm");
 
 // Load a duplicated copy of the jsm to prevent messing with the currently running one
-let scope = {};
+var scope = {};
 Services.scriptloader.loadSubScript("resource://gre/modules/SystemAppProxy.jsm", scope);
 const { SystemAppProxy } = scope;
 
-let frame;
-let customEventTarget;
+var frame;
+var customEventTarget;
 
-let index = -1;
+var index = -1;
 function next() {
   index++;
   if (index >= steps.length) {
     assert.ok(false, "Shouldn't get here!");
     return;
   }
   try {
     steps[index]();
   } catch(ex) {
     assert.ok(false, "Caught exception: " + ex);
   }
 }
 
 // Listen for events received by the system app document
 // to ensure that we receive all of them, in an expected order and time
-let isLoaded = false;
-let n = 0;
+var isLoaded = false;
+var n = 0;
 function listener(event) {
   if (!isLoaded) {
     assert.ok(false, "Received event before the iframe is ready");
     return;
   }
   n++;
   if (n == 1) {
     assert.equal(event.type, "mozChromeEvent");
@@ -55,17 +55,17 @@ function listener(event) {
 
     next(); // call checkEventListening();
   } else {
     assert.ok(false, "Unexpected event of type " + event.type);
   }
 }
 
 
-let steps = [
+var steps = [
   function waitForWebapps() {
     // We are using webapps API later in this test and we need to ensure
     // it is fully initialized before trying to use it
     let { DOMApplicationRegistry } =  Cu.import('resource://gre/modules/Webapps.jsm', {});
     DOMApplicationRegistry.registryReady.then(function () {
       next();
     });
   },
--- a/b2g/components/test/unit/file_killswitch.js
+++ b/b2g/components/test/unit/file_killswitch.js
@@ -7,17 +7,17 @@
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/NetUtil.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
 
-let kUserValues;
+var kUserValues;
 
 function run_test() {
   do_get_profile();
   Cu.import("resource://gre/modules/KillSwitchMain.jsm");
 
   check_enabledValues();
   run_next_test();
 }
--- a/b2g/components/test/unit/head_logshake_gonk.js
+++ b/b2g/components/test/unit/head_logshake_gonk.js
@@ -20,17 +20,17 @@ const Cc = Components.classes;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/osfile.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "volumeService",
                                    "@mozilla.org/telephony/volume-service;1",
                                    "nsIVolumeService");
 
-let sdcard;
+var sdcard;
 
 function setup_logshake_mocks() {
   do_get_profile();
   setup_fs();
 }
 
 function setup_fs() {
   OS.File.makeDir("/data/local/tmp/sdcard/", {from: "/data"}).then(function() {
--- a/b2g/components/test/unit/test_aboutserviceworkers.js
+++ b/b2g/components/test/unit/test_aboutserviceworkers.js
@@ -17,25 +17,25 @@ XPCOMUtils.defineLazyServiceGetter(this,
 
 const CHROME_MSG = "mozAboutServiceWorkersChromeEvent";
 
 const ORIGINAL_SENDRESULT = AboutServiceWorkers.sendResult;
 const ORIGINAL_SENDERROR = AboutServiceWorkers.sendError;
 
 do_get_profile();
 
-let mockSendResult = (aId, aResult) => {
+var mockSendResult = (aId, aResult) => {
   let msg = {
     id: aId,
     result: aResult
   };
   Services.obs.notifyObservers({wrappedJSObject: msg}, CHROME_MSG, null);
 };
 
-let mockSendError = (aId, aError) => {
+var mockSendError = (aId, aError) => {
   let msg = {
     id: aId,
     result: aError
   };
   Services.obs.notifyObservers({wrappedJSObject: msg}, CHROME_MSG, null);
 };
 
 function attachMocks() {
--- a/b2g/components/test/unit/test_fxaccounts.js
+++ b/b2g/components/test/unit/test_fxaccounts.js
@@ -14,28 +14,28 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/FxAccountsMgmtService.jsm",
   "FxAccountsMgmtService");
 
 XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsManager",
   "resource://gre/modules/FxAccountsManager.jsm");
 
 // At end of test, restore original state
 const ORIGINAL_AUTH_URI = Services.prefs.getCharPref("identity.fxaccounts.auth.uri");
-let { SystemAppProxy } = Cu.import("resource://gre/modules/FxAccountsMgmtService.jsm");
+var { SystemAppProxy } = Cu.import("resource://gre/modules/FxAccountsMgmtService.jsm");
 const ORIGINAL_SENDCUSTOM = SystemAppProxy._sendCustomEvent;
 do_register_cleanup(function() {
   Services.prefs.setCharPref("identity.fxaccounts.auth.uri", ORIGINAL_AUTH_URI);
   SystemAppProxy._sendCustomEvent = ORIGINAL_SENDCUSTOM;
 });
 
 // Make profile available so that fxaccounts can store user data
 do_get_profile();
 
 // Mock the system app proxy; make message passing possible
-let mockSendCustomEvent = function(aEventName, aMsg) {
+var mockSendCustomEvent = function(aEventName, aMsg) {
   Services.obs.notifyObservers({wrappedJSObject: aMsg}, aEventName, null);
 };
 
 function run_test() {
   run_next_test();
 }
 
 add_task(function test_overall() {
--- a/b2g/components/test/unit/test_killswitch.js
+++ b/b2g/components/test/unit/test_killswitch.js
@@ -8,27 +8,27 @@ const {results: Cr} = Components;
 
 // Trivial test just to make sure we have no syntax error
 add_test(function test_ksm_ok() {
   ok(KillSwitchMain, "KillSwitchMain object exists");
 
   run_next_test();
 });
 
-let aMessageNoPerm = {
+var aMessageNoPerm = {
   name: "KillSwitch:Enable",
   target: {
     assertPermission: function() {
       return false;
     },
     killChild: function() { }
   }
 };
 
-let aMessageWithPerm = {
+var aMessageWithPerm = {
   name: "KillSwitch:Enable",
   target: {
     assertPermission: function() {
       return true;
     }
   },
   data: {
     requestID: 0
@@ -46,17 +46,17 @@ add_test(function test_sendMessageWithou
 });
 
 add_test(function test_sendMessageWithPerm() {
   let rv = KillSwitchMain.receiveMessage(aMessageWithPerm);
   strictEqual(rv, undefined);
   run_next_test();
 });
 
-let uMessage = {
+var uMessage = {
   name: "KillSwitch:WTF",
   target: {
     assertPermission: function() {
       return true;
     },
     killChild: function() { }
   }
 };
@@ -66,17 +66,17 @@ add_test(function test_sendUnknownMessag
     KillSwitchMain.receiveMessage(uMessage);
     ok(false, "Should have failed");
   } catch (ex) {
     strictEqual(ex, Cr.NS_ERROR_ILLEGAL_VALUE);
   }
   run_next_test();
 });
 
-let fakeLibcUtils = {
+var fakeLibcUtils = {
   _props_: {},
   property_set: function(name, value) {
     dump("property_set('" + name + "', '" + value+ "' [" + (typeof value) + "]);\n");
     this._props_[name] = value;
   },
   property_get: function(name, defaultValue) {
     dump("property_get('" + name + "', '" + defaultValue+ "');\n");
     if (Object.keys(this._props_).indexOf(name) !== -1) {
--- a/b2g/components/test/unit/test_signintowebsite.js
+++ b/b2g/components/test/unit/test_signintowebsite.js
@@ -296,17 +296,17 @@ function test_options_pass_through() {
   }
 
   let controller = SignInToWebsiteController;
   controller.init({pipe: mockSendingPipe(pipeOtherEnd)});
 
   MinimalIDService.RP.watch(mockedDoc, {});
 }
 
-let TESTS = [
+var TESTS = [
   test_overall,
   test_mock_doc,
   test_object_contains,
 
   test_watch,
   test_request_login,
   test_request_logout,
   test_request_login_logout,
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -280,16 +280,19 @@
 @RESPATH@/components/layout_base.xpt
 #ifdef NS_PRINTING
 @RESPATH@/components/layout_printing.xpt
 #endif
 @RESPATH@/components/layout_xul_tree.xpt
 @RESPATH@/components/layout_xul.xpt
 @RESPATH@/components/locale.xpt
 @RESPATH@/components/lwbrk.xpt
+#ifdef MOZ_ENABLE_PROFILER_SPS
+@RESPATH@/components/memory_profiler.xpt
+#endif
 @RESPATH@/components/migration.xpt
 @RESPATH@/components/mimetype.xpt
 @RESPATH@/components/mozfind.xpt
 @RESPATH@/components/necko_about.xpt
 @RESPATH@/components/necko_cache.xpt
 @RESPATH@/components/necko_cache2.xpt
 @RESPATH@/components/necko_cookie.xpt
 @RESPATH@/components/necko_dns.xpt
--- a/b2g/simulator/bootstrap.js
+++ b/b2g/simulator/bootstrap.js
@@ -14,17 +14,17 @@ function registerAddonResourceHandler(da
 
   Services.io.getProtocolHandler("resource").
               QueryInterface(Ci.nsIResProtocolHandler).
               setSubstitution(resourceName, fileuri);
 
   return "resource://" + resourceName + "/";
 }
 
-let mainModule;
+var mainModule;
 
 function install(data, reason) {}
 function uninstall(data, reason) {}
 
 function startup(data, reason) {
   let uri = registerAddonResourceHandler(data);
 
   let loaderModule =
--- a/b2g/simulator/lib/main.js
+++ b/b2g/simulator/lib/main.js
@@ -12,17 +12,17 @@ const { Simulator } = Cu.import("resourc
 const { SimulatorProcess } = require("./simulator-process");
 const Runtime = require("sdk/system/runtime");
 const URL = require("sdk/url");
 
 const ROOT_URI = require("addon").uri;
 const PROFILE_URL = ROOT_URI + "profile/";
 const BIN_URL = ROOT_URI + "b2g/";
 
-let process;
+var process;
 
 function launch(options) {
   // Close already opened simulation.
   if (process) {
     return close().then(launch.bind(null, options));
   }
 
   // Compute B2G runtime path.
@@ -66,17 +66,17 @@ function close() {
   if (!process) {
     return promise.resolve();
   }
   let p = process;
   process = null;
   return p.kill();
 }
 
-let name;
+var name;
 
 AddonManager.getAddonByID(require("addon").id, function (addon) {
   name = addon.name.replace(" Simulator", "");
 
   Simulator.register(name, {
     // We keep the deprecated `appinfo` object so that recent simulator addons
     // remain forward-compatible with older Firefox.
     appinfo: { label: name },
deleted file mode 100644
--- a/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# 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/.
-
-FILES := \
-	install.rdf.in \
-	$(NULL)
-FILES_PATH = $(FINAL_TARGET)/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
-PP_TARGETS := FILES
--- a/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
+++ b/browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
@@ -1,6 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
+FINAL_TARGET = 'dist/bin/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}'
+
+DIST_FILES += [
+    'install.rdf.in',
+]
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -2,17 +2,17 @@
 # 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/.
 
 // Services = object with smart getters for common XPCOM services
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 const PREF_EM_HOTFIX_ID = "extensions.hotfix.id";
 
-let gMenuButton = null;
+var gMenuButton = null;
 try {
   gMenuButton = Services.wm.getMostRecentWindow("navigator:browser")
                         .document.getElementById("PanelUI-menu-button");
 } catch (ex) { };
 
 function init(aEvent)
 {
   if (aEvent.target != document)
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/FxAccounts.jsm");
 
-let fxAccountsCommon = {};
+var fxAccountsCommon = {};
 Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon);
 
 // for master-password utilities
 Cu.import("resource://services-sync/util.js");
 
 const PREF_LAST_FXA_USER = "identity.fxaccounts.lastSignedInUserHash";
 const PREF_SYNC_SHOW_CUSTOMIZATION = "services.sync-setup.ui.showCustomizationDialog";
 
@@ -97,17 +97,17 @@ function shouldAllowRelink(acctName) {
 
 function updateDisplayedEmail(user) {
   let emailDiv = document.getElementById("email");
   if (emailDiv && user) {
     emailDiv.textContent = user.email;
   }
 }
 
-let wrapper = {
+var wrapper = {
   iframe: null,
 
   init: function (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();
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -13,17 +13,17 @@ const prefs = new Preferences("datarepor
 
 const PREF_UNIFIED = "toolkit.telemetry.unified";
 const PREF_UNIFIED_OPTIN = "toolkit.telemetry.unifiedIsOptIn";
 
 // Whether v4 behavior is enabled, i.e. unified Telemetry features are on by default.
 const IS_V4 = Preferences.get(PREF_UNIFIED, false) &&
               !Preferences.get(PREF_UNIFIED_OPTIN, false);
 
-let healthReportWrapper = {
+var healthReportWrapper = {
   init: function () {
     let iframe = document.getElementById("remote-report");
     iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
     iframe.src = this._getReportURI().spec;
     iframe.onload = () => {
       MozSelfSupport.getHealthReportPayload().then(this.updatePayload,
                                                    this.handleInitFailure);
     };
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -16,21 +16,21 @@ const DEFAULT_SNIPPETS_URLS = [
 
 const SNIPPETS_UPDATE_INTERVAL_MS = 14400000; // 4 hours.
 
 // IndexedDB storage constants.
 const DATABASE_NAME = "abouthome";
 const DATABASE_VERSION = 1;
 const DATABASE_STORAGE = "persistent";
 const SNIPPETS_OBJECTSTORE_NAME = "snippets";
-let searchText, findKey;
+var searchText, findKey;
 
 // This global tracks if the page has been set up before, to prevent double inits
-let gInitialized = false;
-let gObserver = new MutationObserver(function (mutations) {
+var gInitialized = false;
+var gObserver = new MutationObserver(function (mutations) {
   for (let mutation of mutations) {
     if (mutation.attributeName == "snippetsVersion") {
       if (!gInitialized) {
         ensureSnippetsMapThen(loadSnippets);
         gInitialized = true;
       }
       return;
     }
@@ -63,18 +63,18 @@ window.addEventListener("keypress", ev =
     searchText.focus();
     ev.preventDefault();
   }
 });
 
 // This object has the same interface as Map and is used to store and retrieve
 // the snippets data.  It is lazily initialized by ensureSnippetsMapThen(), so
 // be sure its callback returned before trying to use it.
-let gSnippetsMap;
-let gSnippetsMapCallbacks = [];
+var gSnippetsMap;
+var gSnippetsMapCallbacks = [];
 
 /**
  * Ensure the snippets map is properly initialized.
  *
  * @param aCallback
  *        Invoked once the map has been initialized, gets the map as argument.
  * @note Snippets should never directly manage the underlying storage, since
  *       it may change inadvertently.
@@ -178,17 +178,17 @@ function ensureSnippetsMapThen(aCallback
 }
 
 function onSearchSubmit(aEvent)
 {
   gContentSearchController.search(aEvent);
 }
 
 
-let gContentSearchController;
+var gContentSearchController;
 
 function setupSearch()
 {
   // The "autofocus" attribute doesn't focus the form element
   // immediately when the element is first drawn, so the
   // attribute is also used for styling when the page first loads.
   searchText = document.getElementById("searchText");
   searchText.addEventListener("blur", function searchText_onBlur() {
@@ -269,17 +269,17 @@ function loadSnippets()
 }
 
 /**
  * Shows locally cached remote snippets, or default ones when not available.
  *
  * @note: snippets should never invoke showSnippets(), or they may cause
  *        a "too much recursion" exception.
  */
-let _snippetsShown = false;
+var _snippetsShown = false;
 function showSnippets()
 {
   let snippetsElt = document.getElementById("snippets");
 
   // Show about:rights notification, if needed.
   let showRights = document.documentElement.getAttribute("showKnowYourRights");
   if (showRights) {
     let rightsElt = document.getElementById("rightsSnippet");
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -645,17 +645,17 @@ var LightWeightThemeWebInstaller = {
     let pm = Services.perms;
     return pm.testPermission(uri, "install") == pm.ALLOW_ACTION;
   }
 };
 
 /*
  * Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
  */
-let LightweightThemeListener = {
+var LightweightThemeListener = {
   _modifiedStyles: [],
 
   init: function () {
     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;
--- a/browser/base/content/browser-customization.js
+++ b/browser/base/content/browser-customization.js
@@ -3,17 +3,17 @@
 # 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/.
 
 /**
  * Customization handler prepares this browser window for entering and exiting
  * customization mode by handling customizationstarting and customizationending
  * events.
  */
-let CustomizationHandler = {
+var CustomizationHandler = {
   handleEvent: function(aEvent) {
     switch(aEvent.type) {
       case "customizationstarting":
         this._customizationStarting();
         break;
       case "customizationchange":
         this._customizationChange();
         break;
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -1,16 +1,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/.
 
 /**
  * Represents an info bar that shows a data submission notification.
  */
-let gDataNotificationInfoBar = {
+var gDataNotificationInfoBar = {
   _OBSERVERS: [
     "datareporting:notify-data-policy:request",
     "datareporting:notify-data-policy:close",
   ],
 
   _DATA_REPORTING_NOTIFICATION: "data-reporting",
 
   get _notificationBox() {
--- a/browser/base/content/browser-devedition.js
+++ b/browser/base/content/browser-devedition.js
@@ -1,17 +1,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/.
 
 /**
  * Listeners for the DevEdition theme.  This adds an extra stylesheet
  * to browser.xul if a pref is set and no other themes are applied.
  */
-let DevEdition = {
+var DevEdition = {
   _devtoolsThemePrefName: "devtools.theme",
   styleSheetLocation: "chrome://browser/skin/devedition.css",
   styleSheet: null,
   initialized: false,
 
   get isStyleSheetEnabled() {
     return this.styleSheet && !this.styleSheet.sheet.disabled;
   },
--- a/browser/base/content/browser-eme.js
+++ b/browser/base/content/browser-eme.js
@@ -1,14 +1,14 @@
 # -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 # 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/.
 
-let gEMEHandler = {
+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;
   },
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -1,13 +1,13 @@
 # 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/.
 
-let gFxAccounts = {
+var gFxAccounts = {
 
   PREF_SYNC_START_DOORHANGER: "services.sync.ui.showSyncStartDoorhanger",
   DOORHANGER_ACTIVATE_DELAY_MS: 5000,
   SYNC_MIGRATION_NOTIFICATION_TITLE: "fxa-migration",
 
   _initialized: false,
   _inCustomizationMode: false,
   // _expectingNotifyClose is a hack that helps us determine if the
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -8,17 +8,17 @@
 // simple gesture events.  Multi-touch gesture APIs are in their
 // infancy and we do NOT want to be forced into supporting an API that
 // will probably have to change in the future.  (The current Mac OS X
 // API is undocumented and was reverse-engineered.)  Until support is
 // implemented in the event dispatcher to keep these events as
 // chrome-only, we must listen for the simple gesture events during
 // the capturing phase and call stopPropagation on every event.
 
-let gGestureSupport = {
+var gGestureSupport = {
   _currentRotation: 0,
   _lastRotateDelta: 0,
   _rotateMomentumThreshold: .75,
 
   /**
    * Add or remove mouse gesture event listeners
    *
    * @param aAddListener
@@ -566,17 +566,17 @@ let gGestureSupport = {
     if (!contentElement)
       return;
     contentElement.classList.remove("completeRotation");
     contentElement.removeEventListener("transitionend", this._clearCompleteRotation);
   },
 };
 
 // History Swipe Animation Support (bug 678392)
-let gHistorySwipeAnimation = {
+var gHistorySwipeAnimation = {
 
   active: false,
   isLTR: false,
 
   /**
    * Initializes the support for history swipe animations, if it is supported
    * by the platform/configuration.
    */
--- a/browser/base/content/browser-loop.js
+++ b/browser/base/content/browser-loop.js
@@ -1,14 +1,14 @@
 // 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/.
 
 // the "exported" symbols
-let LoopUI;
+var LoopUI;
 
 (function() {
   const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
   const kBrowserSharingNotificationId = "loop-sharing-notification";
   const kPrefBrowserSharingInfoBar = "browserSharing.showInfoBar";
 
   LoopUI = {
     /**
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1022,17 +1022,17 @@ var PlacesMenuDNDHandler = {
 
 ////////////////////////////////////////////////////////////////////////////////
 //// PlacesToolbarHelper
 
 /**
  * This object handles the initialization and uninitialization of the bookmarks
  * toolbar.
  */
-let PlacesToolbarHelper = {
+var PlacesToolbarHelper = {
   _place: "place:folder=TOOLBAR",
 
   get _viewElt() {
     return document.getElementById("PlacesToolbar");
   },
 
   get _placeholder() {
     return document.getElementById("bookmarks-toolbar-placeholder");
@@ -1169,17 +1169,17 @@ let PlacesToolbarHelper = {
 
 ////////////////////////////////////////////////////////////////////////////////
 //// BookmarkingUI
 
 /**
  * Handles the bookmarks menu-button in the toolbar.
  */
 
-let BookmarkingUI = {
+var BookmarkingUI = {
   BOOKMARK_BUTTON_ID: "bookmarks-menu-button",
   BOOKMARK_BUTTON_SHORTCUT: "addBookmarkAsKb",
   get button() {
     delete this.button;
     let widgetGroup = CustomizableUI.getWidget(this.BOOKMARK_BUTTON_ID);
     return this.button = widgetGroup.forWindow(window).node;
   },
 
--- a/browser/base/content/browser-sidebar.js
+++ b/browser/base/content/browser-sidebar.js
@@ -14,17 +14,17 @@
  *  - sidebarurl   (required) specifies the URL to load in this sidebar.
  *  - sidebartitle or label (in that order) specify the title to
  *                 display on the sidebar.
  *  - checked      indicates whether the sidebar is currently displayed.
  *                 Note that toggleSidebar updates this attribute when
  *                 it changes the sidebar's visibility.
  *  - group        this attribute must be set to "sidebar".
  */
-let SidebarUI = {
+var SidebarUI = {
   browser: null,
 
   _box: null,
   _title: null,
   _splitter: null,
 
   init() {
     this._box = document.getElementById("sidebar-box");
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -1,14 +1,14 @@
 // 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/.
 
 // the "exported" symbols
-let SocialUI,
+var SocialUI,
     SocialFlyout,
     SocialMarks,
     SocialShare,
     SocialSidebar,
     SocialStatus,
     SocialActivationListener;
 
 (function() {
@@ -1167,17 +1167,17 @@ ToolbarHelper.prototype = {
     // as a part of the UI (otherwise they belong in the palette).
     for (let provider of Social.providers) {
       let id = this.idFromOrigin(provider.origin);
       this._createButton(id, provider);
     }
   }
 }
 
-let SocialStatusWidgetListener = {
+var SocialStatusWidgetListener = {
   _getNodeOrigin: function(aWidgetId) {
     // we rely on the button id being the same as the widget.
     let node = document.getElementById(aWidgetId);
     if (!node)
       return null
     if (!node.classList.contains("social-status-button"))
       return null
     return node.getAttribute("origin");
@@ -1292,17 +1292,17 @@ SocialStatus = {
                           frame.addEventListener("close", () => { SocialStatus._onclose(frame) }, true);
                           frame.addEventListener("click", this._onclick, true);
                         });
     Services.telemetry.getHistogramById("SOCIAL_TOOLBAR_BUTTONS").add(1);
   }
 };
 
 
-let SocialMarksWidgetListener = {
+var SocialMarksWidgetListener = {
   onWidgetAdded: function(aWidgetId, aArea, aPosition) {
     let node = document.getElementById(aWidgetId);
     if (!node || !node.classList.contains("social-mark-button"))
       return;
     node._receiveMessage = node.receiveMessage.bind(node);
     messageManager.addMessageListener("Social:ErrorPageNotify", node._receiveMessage);
   },
   onWidgetBeforeDOMChange: function(aNode, aNextNode, aContainer, isRemoval) {
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -3,21 +3,21 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 #ifdef MOZ_SERVICES_CLOUDSYNC
 XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
                                   "resource://gre/modules/CloudSync.jsm");
 #else
-let CloudSync = null;
+var CloudSync = null;
 #endif
 
 // gSyncUI handles updating the tools menu and displaying notifications.
-let gSyncUI = {
+var gSyncUI = {
   _obs: ["weave:service:sync:start",
          "weave:service:sync:finish",
          "weave:service:sync:error",
          "weave:service:setup-complete",
          "weave:service:login:start",
          "weave:service:login:finish",
          "weave:service:login:error",
          "weave:service:logout:finish",
--- a/browser/base/content/browser-tabview.js
+++ b/browser/base/content/browser-tabview.js
@@ -1,13 +1,13 @@
 # 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/.
 
-let TabView = {
+var TabView = {
   _deck: null,
   _iframe: null,
   _window: null,
   _initialized: false,
   _browserKeyHandlerInitialized: false,
   _closedLastVisibleTabBeforeFrameInitialized: false,
   _isFrameLoading: false,
   _initFrameCallbacks: [],
--- a/browser/base/content/browser-thumbnails.js
+++ b/browser/base/content/browser-thumbnails.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/. */
 #endif
 
 /**
  * Keeps thumbnails of open web pages up-to-date.
  */
-let gBrowserThumbnails = {
+var gBrowserThumbnails = {
   /**
    * Pref that controls whether we can store SSL content on disk
    */
   PREF_DISK_CACHE_SSL: "browser.cache.disk_cache_ssl",
 
   _captureDelayMS: 1000,
 
   /**
--- a/browser/base/content/browser-trackingprotection.js
+++ b/browser/base/content/browser-trackingprotection.js
@@ -1,13 +1,13 @@
 # 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/.
 
-let TrackingProtection = {
+var TrackingProtection = {
   MAX_INTROS: 0,
   PREF_ENABLED_GLOBALLY: "privacy.trackingprotection.enabled",
   PREF_ENABLED_IN_PRIVATE_WINDOWS: "privacy.trackingprotection.pbmode.enabled",
   enabledGlobally: false,
   enabledInPrivateWindows: false,
   container: null,
   content: null,
   icon: null,
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1,16 +1,16 @@
 # -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
 # 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/.
 
-let Ci = Components.interfaces;
-let Cu = Components.utils;
-let Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
+var Cc = Components.classes;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/NotificationDB.jsm");
 Cu.import("resource:///modules/RecentWindow.jsm");
 
 
 XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
                                   "resource://gre/modules/Preferences.jsm");
@@ -246,17 +246,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/SimpleServiceDiscovery.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode",
   "resource://gre/modules/ReaderMode.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent",
   "resource:///modules/ReaderParent.jsm");
 
-let gInitialPages = [
+var gInitialPages = [
   "about:blank",
   "about:newtab",
   "about:home",
   "about:privatebrowsing",
   "about:welcomeback",
   "about:sessionrestore"
 ];
 
@@ -2588,17 +2588,17 @@ function SetPageProxyState(aState)
 }
 
 function PageProxyClickHandler(aEvent)
 {
   if (aEvent.button == 1 && gPrefService.getBoolPref("middlemouse.paste"))
     middleMousePaste(aEvent);
 }
 
-let gMenuButtonBadgeManager = {
+var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_FXA: "fxa",
 
   fxaBadge: null,
   appUpdateBadge: null,
 
   init: function () {
     PanelUI.panel.addEventListener("popupshowing", this, true);
@@ -2650,17 +2650,17 @@ let gMenuButtonBadgeManager = {
   clearBadges: function () {
     this.appUpdateBadge = null;
     this.fxaBadge = null;
     this._showBadge();
   }
 };
 
 // Setup the hamburger button badges for updates, if enabled.
-let gMenuButtonUpdateBadge = {
+var gMenuButtonUpdateBadge = {
   enabled: false,
   badgeWaitTime: 0,
   timer: null,
 
   init: function () {
     try {
       this.enabled = Services.prefs.getBoolPref("app.update.badge");
     } catch (e) {}
@@ -2757,17 +2757,17 @@ const TLS_ERROR_REPORT_TELEMETRY_AUTO_UN
 const TLS_ERROR_REPORT_TELEMETRY_MANUAL_SEND    = 4;
 const TLS_ERROR_REPORT_TELEMETRY_AUTO_SEND      = 5;
 
 /**
  * Handle command events bubbling up from error page content
  * or from about:newtab or from remote error pages that invoke
  * us via async messaging.
  */
-let BrowserOnClick = {
+var BrowserOnClick = {
   init: function () {
     let mm = window.messageManager;
     mm.addMessageListener("Browser:CertExceptionError", this);
     mm.addMessageListener("Browser:SiteBlockedError", this);
     mm.addMessageListener("Browser:EnableOnlineMode", this);
     mm.addMessageListener("Browser:SendSSLErrorReport", this);
     mm.addMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.addMessageListener("Browser:SSLErrorReportTelemetry", this);
@@ -7370,17 +7370,17 @@ function getTabModalPromptBox(aWindow) {
     return gBrowser.getTabModalPromptBox(foundBrowser);
   return null;
 };
 
 /* DEPRECATED */
 function getBrowser() gBrowser;
 function getNavToolbox() gNavToolbox;
 
-let gPrivateBrowsingUI = {
+var gPrivateBrowsingUI = {
   init: function PBUI_init() {
     // Do nothing for normal windows
     if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
       return;
     }
 
     // Disable the Clear Recent History... menu item when in PB mode
     // temporary fix until bug 463607 is fixed
@@ -7427,17 +7427,17 @@ let gPrivateBrowsingUI = {
       if (!value.includes("private-window")) {
         value += " private-window";
       }
       gURLBar.setAttribute("autocompletesearchparam", value);
     }
   }
 };
 
-let gRemoteTabsUI = {
+var gRemoteTabsUI = {
   init: function() {
     if (window.location.href != getBrowserURL() &&
         // Also check hidden window for the Mac no-window case
         window.location.href != "chrome://browser/content/hiddenWindow.xul") {
       return;
     }
 
 #ifdef XP_MACOSX
@@ -7562,17 +7562,17 @@ function switchToTabHavingURI(aURI, aOpe
       openUILinkIn(aURI.spec, "current", aOpenParams);
     else
       openUILinkIn(aURI.spec, "tab", aOpenParams);
   }
 
   return false;
 }
 
-let RestoreLastSessionObserver = {
+var RestoreLastSessionObserver = {
   init: function () {
     if (SessionStore.canRestoreLastSession &&
         !PrivateBrowsingUtils.isWindowPrivate(window)) {
       Services.obs.addObserver(this, "sessionstore-last-session-cleared", true);
       goSetCommandEnabled("Browser:RestoreLastSession", true);
     }
   },
 
@@ -7868,17 +7868,17 @@ var MousePosTracker = {
 function BrowserOpenNewTabOrWindow(event) {
   if (event.shiftKey) {
     OpenBrowserWindow();
   } else {
     BrowserOpenTab();
   }
 }
 
-let ToolbarIconColor = {
+var ToolbarIconColor = {
   init: function () {
     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
@@ -7944,17 +7944,17 @@ let ToolbarIconColor = {
       if (luminance <= 110)
         toolbar.removeAttribute("brighttext");
       else
         toolbar.setAttribute("brighttext", "true");
     }
   }
 }
 
-let PanicButtonNotifier = {
+var PanicButtonNotifier = {
   init: function() {
     this._initialized = true;
     if (window.PanicButtonNotifierShouldNotify) {
       delete window.PanicButtonNotifierShouldNotify;
       this.notify();
     }
   },
   notify: function() {
@@ -7975,17 +7975,17 @@ let PanicButtonNotifier = {
     }
   },
   close: function() {
     let popup = document.getElementById("panic-button-success-notification");
     popup.hidePopup();
   },
 };
 
-let AboutPrivateBrowsingListener = {
+var AboutPrivateBrowsingListener = {
   init: function () {
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:OpenPrivateWindow",
       msg => {
         OpenBrowserWindow({private: true});
     });
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:ToggleTrackingProtection",
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -1,17 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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 content script should work in any browser or iframe and should not
  * depend on the frame being contained in tabbrowser. */
 
-let {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource:///modules/ContentWebRTC.jsm");
 Cu.import("resource:///modules/ContentObservers.jsm");
 Cu.import("resource://gre/modules/InlineSpellChecker.jsm");
 Cu.import("resource://gre/modules/InlineSpellCheckerContent.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
@@ -67,17 +67,17 @@ addEventListener("pageshow", function(ev
 });
 addEventListener("DOMAutoComplete", function(event) {
   LoginManagerContent.onUsernameInput(event);
 });
 addEventListener("blur", function(event) {
   LoginManagerContent.onUsernameInput(event);
 });
 
-let handleContentContextMenu = function (event) {
+var handleContentContextMenu = function (event) {
   let defaultPrevented = event.defaultPrevented;
   if (!Services.prefs.getBoolPref("dom.event.contextmenu.enabled")) {
     let plugin = null;
     try {
       plugin = event.target.QueryInterface(Ci.nsIObjectLoadingContent);
     } catch (e) {}
     if (plugin && plugin.displayedType == Ci.nsIObjectLoadingContent.TYPE_PLUGIN) {
       // Don't open a context menu for plugins.
@@ -202,17 +202,17 @@ Cc["@mozilla.org/eventlistenerservice;1"
   .addSystemEventListener(global, "contextmenu", handleContentContextMenu, false);
 
 // Values for telemtery bins: see TLS_ERROR_REPORT_UI in Histograms.json
 const TLS_ERROR_REPORT_TELEMETRY_UI_SHOWN = 0;
 const TLS_ERROR_REPORT_TELEMETRY_EXPANDED = 1;
 const TLS_ERROR_REPORT_TELEMETRY_SUCCESS  = 6;
 const TLS_ERROR_REPORT_TELEMETRY_FAILURE  = 7;
 
-let AboutNetErrorListener = {
+var AboutNetErrorListener = {
   init: function(chromeGlobal) {
     chromeGlobal.addEventListener('AboutNetErrorLoad', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorSetAutomatic', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorSendReport', this, false, true);
     chromeGlobal.addEventListener('AboutNetErrorUIExpanded', this, false, true);
   },
 
   get isAboutNetError() {
@@ -331,17 +331,17 @@ let AboutNetErrorListener = {
         securityInfo: serializedSecurityInfo
       });
   }
 }
 
 AboutNetErrorListener.init(this);
 
 
-let ClickEventHandler = {
+var ClickEventHandler = {
   init: function init() {
     Cc["@mozilla.org/eventlistenerservice;1"]
       .getService(Ci.nsIEventListenerService)
       .addSystemEventListener(global, "click", this, true);
   },
 
   handleEvent: function(event) {
     if (!event.isTrusted || event.defaultPrevented || event.button == 2) {
@@ -513,17 +513,17 @@ let ClickEventHandler = {
     return [href ? BrowserUtils.makeURI(href, null, baseURI).spec : null, null];
   }
 };
 ClickEventHandler.init();
 
 ContentLinkHandler.init(this);
 
 // TODO: Load this lazily so the JSM is run only if a relevant event/message fires.
-let pluginContent = new PluginContent(global);
+var pluginContent = new PluginContent(global);
 
 addEventListener("DOMWebNotificationClicked", function(event) {
   sendAsyncMessage("DOMWebNotificationClicked", {});
 }, false);
 
 addEventListener("DOMServiceWorkerFocusClient", function(event) {
   sendAsyncMessage("DOMServiceWorkerFocusClient", {});
 }, false);
@@ -545,17 +545,17 @@ addMessageListener("webrtc:StartBrowserS
 addEventListener("pageshow", function(event) {
   if (event.target == content.document) {
     sendAsyncMessage("PageVisibility:Show", {
       persisted: event.persisted,
     });
   }
 });
 
-let PageMetadataMessenger = {
+var PageMetadataMessenger = {
   init() {
     addMessageListener("PageMetadata:GetPageData", this);
     addMessageListener("PageMetadata:GetMicrodata", this);
   },
   receiveMessage(message) {
     switch(message.name) {
       case "PageMetadata:GetPageData": {
         let result = PageMetadata.getData(content.document);
@@ -748,17 +748,17 @@ addMessageListener("ContextMenu:SearchFi
     let separator = spec.includes("?") ? "&" : "?";
     spec += separator + formData.join("&");
   }
 
   sendAsyncMessage("ContextMenu:SearchFieldBookmarkData:Result",
                    { spec, title, description, postData, charset });
 });
 
-let LightWeightThemeWebInstallListener = {
+var LightWeightThemeWebInstallListener = {
   _previewWindow: null,
 
   init: function() {
     addEventListener("InstallBrowserTheme", this, false, true);
     addEventListener("PreviewBrowserTheme", this, false, true);
     addEventListener("ResetBrowserThemePreview", this, false, true);
   },
 
@@ -848,17 +848,17 @@ addMessageListener("ContextMenu:SetAsDes
       disable = true;
     }
   }
 
   if (disable)
     sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result", { disable });
 });
 
-let PageInfoListener = {
+var PageInfoListener = {
 
   init: function() {
     addMessageListener("PageInfo:getData", this);
   },
 
   receiveMessage: function(message) {
     let strings = message.data.strings;
     let window;
--- a/browser/base/content/newtab/customize.js
+++ b/browser/base/content/newtab/customize.js
@@ -1,15 +1,15 @@
 #ifdef 0
 /* 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/. */
 #endif
 
-let gCustomize = {
+var gCustomize = {
   _nodeIDSuffixes: [
     "blank",
     "button",
     "classic",
     "enhanced",
     "panel",
     "overlay",
     "learn"
--- a/browser/base/content/newtab/drag.js
+++ b/browser/base/content/newtab/drag.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/. */
 #endif
 
 /**
  * This singleton implements site dragging functionality.
  */
-let gDrag = {
+var gDrag = {
   /**
    * The site offset to the drag start point.
    */
   _offsetX: null,
   _offsetY: null,
 
   /**
    * The site that is dragged.
--- a/browser/base/content/newtab/dragDataHelper.js
+++ b/browser/base/content/newtab/dragDataHelper.js
@@ -1,15 +1,15 @@
 #ifdef 0
 /* 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/. */
 #endif
 
-let gDragDataHelper = {
+var gDragDataHelper = {
   get mimeType() {
     return "text/x-moz-url";
   },
 
   getLinkFromDragEvent: function DragDataHelper_getLinkFromDragEvent(aEvent) {
     let dt = aEvent.dataTransfer;
     if (!dt || !dt.types.contains(this.mimeType)) {
       return null;
--- a/browser/base/content/newtab/drop.js
+++ b/browser/base/content/newtab/drop.js
@@ -6,17 +6,17 @@
 
 // A little delay that prevents the grid from being too sensitive when dragging
 // sites around.
 const DELAY_REARRANGE_MS = 100;
 
 /**
  * This singleton implements site dropping functionality.
  */
-let gDrop = {
+var gDrop = {
   /**
    * The last drop target.
    */
   _lastDropTarget: null,
 
   /**
    * Handles the 'dragenter' event.
    * @param aCell The drop target cell.
--- a/browser/base/content/newtab/dropPreview.js
+++ b/browser/base/content/newtab/dropPreview.js
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 #endif
 
 /**
  * This singleton provides the ability to re-arrange the current grid to
  * indicate the transformation that results from dropping a cell at a certain
  * position.
  */
-let gDropPreview = {
+var gDropPreview = {
   /**
    * Rearranges the sites currently contained in the grid when a site would be
    * dropped onto the given cell.
    * @param aCell The drop target cell.
    * @return The re-arranged array of sites.
    */
   rearrange: function DropPreview_rearrange(aCell) {
     let sites = gGrid.sites;
--- a/browser/base/content/newtab/dropTargetShim.js
+++ b/browser/base/content/newtab/dropTargetShim.js
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 #endif
 
 /**
  * This singleton provides a custom drop target detection. We need this because
  * the default DnD target detection relies on the cursor's position. We want
  * to pick a drop target based on the dragged site's position.
  */
-let gDropTargetShim = {
+var gDropTargetShim = {
   /**
    * Cache for the position of all cells, cleaned after drag finished.
    */
   _cellPositions: null,
 
   /**
    * The last drop target that was hovered.
    */
--- a/browser/base/content/newtab/grid.js
+++ b/browser/base/content/newtab/grid.js
@@ -9,17 +9,17 @@
  */
 const GRID_BOTTOM_EXTRA = 7; // title's line-height extends 7px past the margin
 const GRID_WIDTH_EXTRA = 1; // provide 1px buffer to allow for rounding error
 const SPONSORED_TAG_BUFFER = 2; // 2px buffer to clip off top of sponsored tag
 
 /**
  * This singleton represents the grid that contains all sites.
  */
-let gGrid = {
+var gGrid = {
   /**
    * The DOM node of the grid.
    */
   _node: null,
   get node() { return this._node; },
 
   /**
    * The cached DOM fragment for sites.
--- a/browser/base/content/newtab/intro.js
+++ b/browser/base/content/newtab/intro.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/. */
 #endif
 
 const PREF_INTRO_SHOWN = "browser.newtabpage.introShown";
 const PREF_NEWTAB_ENHANCED = "browser.newtabpage.enhanced";
 
-let gIntro = {
+var gIntro = {
   _nodeIDSuffixes: [
     "mask",
     "modal",
     "text",
     "buttons",
     "header",
     "footer"
   ],
--- a/browser/base/content/newtab/newTab.js
+++ b/browser/base/content/newtab/newTab.js
@@ -1,32 +1,32 @@
 /* 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/. */
 
 "use strict";
 
-let Cu = Components.utils;
-let Ci = Components.interfaces;
+var Cu = Components.utils;
+var Ci = Components.interfaces;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/PageThumbs.jsm");
 Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm");
 Cu.import("resource:///modules/DirectoryLinksProvider.jsm");
 Cu.import("resource://gre/modules/NewTabUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "Rect",
   "resource://gre/modules/Geometry.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
   "resource://gre/modules/PrivateBrowsingUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
   "resource://gre/modules/UpdateChannel.jsm");
 
-let {
+var {
   links: gLinks,
   allPages: gAllPages,
   linkChecker: gLinkChecker,
   pinnedLinks: gPinnedLinks,
   blockedLinks: gBlockedLinks,
   gridPrefs: gGridPrefs
 } = NewTabUtils;
 
--- a/browser/base/content/newtab/page.js
+++ b/browser/base/content/newtab/page.js
@@ -6,17 +6,17 @@
 
 // The amount of time we wait while coalescing updates for hidden pages.
 const SCHEDULE_UPDATE_TIMEOUT_MS = 1000;
 
 /**
  * This singleton represents the whole 'New Tab Page' and takes care of
  * initializing all its components.
  */
-let gPage = {
+var gPage = {
   /**
    * Initializes the page.
    */
   init: function Page_init() {
     // Add ourselves to the list of pages to receive notifications.
     gAllPages.register(this);
 
     // Listen for 'unload' to unregister this page.
--- a/browser/base/content/newtab/search.js
+++ b/browser/base/content/newtab/search.js
@@ -1,15 +1,15 @@
 #ifdef 0
 /* 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/. */
 #endif
 
-let gSearch = {
+var gSearch = {
   init: function () {
     document.getElementById("newtab-search-submit")
             .addEventListener("click", e => this._contentSearchController.search(e));
     let textbox = document.getElementById("newtab-search-text");
     this._contentSearchController =
       new ContentSearchUIController(textbox, textbox.parentNode, "newtab", "newtab");
   },
 };
--- a/browser/base/content/newtab/transformations.js
+++ b/browser/base/content/newtab/transformations.js
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 #endif
 
 /**
  * This singleton allows to transform the grid by repositioning a site's node
  * in the DOM and by showing or hiding the node. It additionally provides
  * convenience methods to work with a site's DOM node.
  */
-let gTransformation = {
+var gTransformation = {
   /**
    * Returns the width of the left and top border of a cell. We need to take it
    * into account when measuring and comparing site and cell positions.
    */
   get _cellBorderWidths() {
     let cstyle = window.getComputedStyle(gGrid.cells[0].node, null);
     let widths = {
       left: parseInt(cstyle.getPropertyValue("border-left-width")),
--- a/browser/base/content/newtab/undo.js
+++ b/browser/base/content/newtab/undo.js
@@ -3,17 +3,17 @@
  * 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/. */
 #endif
 
 /**
  * Dialog allowing to undo the removal of single site or to completely restore
  * the grid's original state.
  */
-let gUndoDialog = {
+var gUndoDialog = {
   /**
    * The undo dialog's timeout in miliseconds.
    */
   HIDE_TIMEOUT_MS: 15000,
 
   /**
    * Contains undo information.
    */
--- a/browser/base/content/newtab/updater.js
+++ b/browser/base/content/newtab/updater.js
@@ -3,17 +3,17 @@
  * 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/. */
 #endif
 
 /**
  * This singleton provides functionality to update the current grid to a new
  * set of pinned and blocked sites. It adds, moves and removes sites.
  */
-let gUpdater = {
+var gUpdater = {
   /**
    * Updates the current grid according to its pinned and blocked sites.
    * This removes old, moves existing and creates new sites to fill gaps.
    * @param aCallback The callback to call when finished.
    */
   updateGrid: function Updater_updateGrid(aCallback) {
     let links = gLinks.getLinks().slice(0, gGrid.cells.length);
 
--- a/browser/base/content/safeMode.js
+++ b/browser/base/content/safeMode.js
@@ -1,22 +1,22 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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/. */
 
-let Cc = Components.classes;
-let Ci = Components.interfaces;
-let Cu = Components.utils;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
+var Cu = Components.utils;
 
 const appStartup = Services.startup;
 
 Cu.import("resource://gre/modules/ResetProfile.jsm");
 
-let defaultToReset = false;
+var defaultToReset = false;
 
 function restartApp() {
   appStartup.quit(appStartup.eForceQuit | appStartup.eRestart);
 }
 
 function resetProfile() {
   // Set the reset profile environment variable.
   let env = Cc["@mozilla.org/process/environment;1"]
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -13,20 +13,20 @@ Cu.import("resource://gre/modules/XPCOMU
 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
                                   "resource://gre/modules/Promise.jsm");
 
 #ifdef MOZ_SERVICES_CLOUDSYNC
 XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
                                   "resource://gre/modules/CloudSync.jsm");
 #else
-let CloudSync = null;
+var CloudSync = null;
 #endif
 
-let RemoteTabViewer = {
+var RemoteTabViewer = {
   _tabsList: null,
 
   init: function () {
     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);
 
--- a/browser/base/content/sync/addDevice.js
+++ b/browser/base/content/sync/addDevice.js
@@ -10,17 +10,17 @@ Cu.import("resource://services-sync/main
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const PIN_PART_LENGTH = 4;
 
 const ADD_DEVICE_PAGE       = 0;
 const SYNC_KEY_PAGE         = 1;
 const DEVICE_CONNECTED_PAGE = 2;
 
-let gSyncAddDevice = {
+var gSyncAddDevice = {
 
   init: function init() {
     this.pin1.setAttribute("maxlength", PIN_PART_LENGTH);
     this.pin2.setAttribute("maxlength", PIN_PART_LENGTH);
     this.pin3.setAttribute("maxlength", PIN_PART_LENGTH);
 
     this.nextFocusEl = {pin1: this.pin2,
                         pin2: this.pin3,
--- a/browser/base/content/sync/genericChange.js
+++ b/browser/base/content/sync/genericChange.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const Ci = Components.interfaces;
 const Cc = Components.classes;
 
 Components.utils.import("resource://services-sync/main.js");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
-let Change = {
+var Change = {
   _dialog: null,
   _dialogType: null,
   _status: null,
   _statusIcon: null,
   _firstBox: null,
   _secondBox: null,
 
   get _passphraseBox() {
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Equivalent to 0600 permissions; used for saved Sync Recovery Key.
 // This constant can be replaced when the equivalent values are available to
 // chrome JS; see Bug 433295 and Bug 757351.
 const PERMISSIONS_RWUSR = 0x180;
 
 // Weave should always exist before before this file gets included.
-let gSyncUtils = {
+var gSyncUtils = {
   get bundle() {
     delete this.bundle;
     return this.bundle = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
   },
 
   get fxAccountsEnabled() {
     let service = Components.classes["@mozilla.org/weave/service;1"]
                             .getService(Components.interfaces.nsISupports)
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -1,16 +1,16 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* 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 content script contains code that requires a tab browser. */
 
-let {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
+var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/ExtensionContent.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "E10SUtils",
   "resource:///modules/E10SUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
@@ -92,17 +92,17 @@ addMessageListener("SecondScreen:tab-mir
   if (app) {
     let width = content.innerWidth;
     let height = content.innerHeight;
     let viewport = {cssWidth: width, cssHeight: height, width: width, height: height};
     app.mirror(function() {}, content, viewport, function() {}, content);
   }
 });
 
-let AboutHomeListener = {
+var AboutHomeListener = {
   init: function(chromeGlobal) {
     chromeGlobal.addEventListener('AboutHomeLoad', this, false, true);
   },
 
   get isAboutHome() {
     return content.document.documentURI.toLowerCase() == "about:home";
   },
 
@@ -222,17 +222,17 @@ let AboutHomeListener = {
     removeEventListener("pagehide", this, true);
     if (aEvent.target.documentElement) {
       aEvent.target.documentElement.removeAttribute("hasBrowserHandlers");
     }
   },
 };
 AboutHomeListener.init(this);
 
-let AboutPrivateBrowsingListener = {
+var AboutPrivateBrowsingListener = {
   init(chromeGlobal) {
     chromeGlobal.addEventListener("AboutPrivateBrowsingOpenWindow", this,
                                   false, true);
     chromeGlobal.addEventListener("AboutPrivateBrowsingToggleTrackingProtection", this,
                                   false, true);
   },
 
   get isAboutPrivateBrowsing() {
@@ -250,17 +250,17 @@ let AboutPrivateBrowsingListener = {
       case "AboutPrivateBrowsingToggleTrackingProtection":
         sendAsyncMessage("AboutPrivateBrowsing:ToggleTrackingProtection");
         break;
     }
   },
 };
 AboutPrivateBrowsingListener.init(this);
 
-let AboutReaderListener = {
+var AboutReaderListener = {
 
   _articlePromise: null,
 
   init: function() {
     addEventListener("AboutReaderContentLoaded", this, false, true);
     addEventListener("DOMContentLoaded", this, false);
     addEventListener("pageshow", this, false);
     addEventListener("pagehide", this, false);
@@ -368,17 +368,17 @@ let AboutReaderListener = {
     } else if (forceNonArticle) {
       sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: false });
     }
   },
 };
 AboutReaderListener.init();
 
 
-let ContentSearchMediator = {
+var ContentSearchMediator = {
 
   whitelist: new Set([
     "about:home",
     "about:newtab",
   ]),
 
   init: function (chromeGlobal) {
     chromeGlobal.addEventListener("ContentSearchClient", this, true, true);
@@ -423,17 +423,17 @@ let ContentSearchMediator = {
       },
     }, content);
     content.dispatchEvent(new content.CustomEvent("ContentSearchService",
                                                   event));
   },
 };
 ContentSearchMediator.init(this);
 
-let PageStyleHandler = {
+var PageStyleHandler = {
   init: function() {
     addMessageListener("PageStyle:Switch", this);
     addMessageListener("PageStyle:Disable", this);
 
     // Send a CPOW to the parent so that it can synchronously request
     // the list of style sheets.
     sendSyncMessage("PageStyle:SetSyncHandler", {}, {syncHandler: this});
   },
@@ -520,17 +520,17 @@ let PageStyleHandler = {
     }
 
     return result;
   },
 };
 PageStyleHandler.init();
 
 // Keep a reference to the translation content handler to avoid it it being GC'ed.
-let trHandler = null;
+var trHandler = null;
 if (Services.prefs.getBoolPref("browser.translation.detectLanguage")) {
   Cu.import("resource:///modules/translation/TranslationContentHandler.jsm");
   trHandler = new TranslationContentHandler(global, docShell);
 }
 
 function gKeywordURIFixup(fixupInfo) {
   fixupInfo.QueryInterface(Ci.nsIURIFixupInfo);
 
@@ -559,17 +559,17 @@ addEventListener("unload", () => {
 }, false);
 
 addMessageListener("Browser:AppTab", function(message) {
   if (docShell) {
     docShell.isAppTab = message.data.isAppTab;
   }
 });
 
-let WebBrowserChrome = {
+var WebBrowserChrome = {
   onBeforeLinkTraversal: function(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) {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
@@ -582,17 +582,17 @@ let WebBrowserChrome = {
 
 if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
   let tabchild = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsITabChild);
   tabchild.webBrowserChrome = WebBrowserChrome;
 }
 
 
-let DOMFullscreenHandler = {
+var DOMFullscreenHandler = {
   _fullscreenDoc: null,
 
   init: function() {
     addMessageListener("DOMFullscreen:Entered", this);
     addMessageListener("DOMFullscreen:CleanUp", this);
     addEventListener("MozDOMFullscreen:Request", this);
     addEventListener("MozDOMFullscreen:Entered", this);
     addEventListener("MozDOMFullscreen:NewOrigin", this);
--- a/browser/base/content/test/chat/browser_chatwindow.js
+++ b/browser/base/content/test/chat/browser_chatwindow.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/. */
 
 Components.utils.import("resource://gre/modules/Promise.jsm", this);
 
-let chatbar = document.getElementById("pinnedchats");
+var chatbar = document.getElementById("pinnedchats");
 
 add_chat_task(function* testOpenCloseChat() {
   let chatbox = yield promiseOpenChat("http://example.com");
   Assert.strictEqual(chatbox, chatbar.selectedChat);
   // we requested a "normal" chat, so shouldn't be minimized
   Assert.ok(!chatbox.minimized, "chat is not minimized");
   Assert.equal(chatbar.childNodes.length, 1, "should be 1 chat open");
 
--- a/browser/base/content/test/chat/browser_focus.js
+++ b/browser/base/content/test/chat/browser_focus.js
@@ -17,17 +17,17 @@ function isTabFocused() {
 
 // Is the specified chat focused?
 function isChatFocused(chat) {
   // focus sucks in tests - our window may have lost focus.
   let elt = Services.focus.getFocusedElementForWindow(window, false, {});
   return elt == chat.content;
 }
 
-let chatbar = document.getElementById("pinnedchats");
+var chatbar = document.getElementById("pinnedchats");
 
 function* setUp() {
   // Note that (probably) due to bug 604289, if a tab is focused but the
   // focused element is null, our chat windows can "steal" focus.  This is
   // avoided if we explicitly focus an element in the tab.
   // So we load a page with an <input> field and focus that before testing.
   let html = '<input id="theinput"><button id="chat-opener"></button>';
   let url = "data:text/html;charset=utf-8," + encodeURI(html);
--- a/browser/base/content/test/chat/browser_tearoff.js
+++ b/browser/base/content/test/chat/browser_tearoff.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/. */
 
 Components.utils.import("resource://gre/modules/Promise.jsm", this);
 
-let chatbar = document.getElementById("pinnedchats");
+var chatbar = document.getElementById("pinnedchats");
 
 function promiseNewWindowLoaded() {
   let deferred = Promise.defer();
   Services.wm.addListener({
     onWindowTitleChange: function() {},
     onCloseWindow: function(xulwindow) {},
     onOpenWindow: function(xulwindow) {
       var domwindow = xulwindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
--- a/browser/base/content/test/chat/head.js
+++ b/browser/base/content/test/chat/head.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/. */
 
 // Utility functions for Chat tests.
 
-let Chat = Cu.import("resource:///modules/Chat.jsm", {}).Chat;
+var Chat = Cu.import("resource:///modules/Chat.jsm", {}).Chat;
 
 function promiseOpenChat(url, mode, focus) {
   let uri = Services.io.newURI(url, null, null);
   let origin = uri.prePath;
   let title = origin;
   let deferred = Promise.defer();
   // we just through a few hoops to ensure the content document is fully
   // loaded, otherwise tests that rely on that content may intermittently fail.
--- a/browser/base/content/test/general/browser_URLBarSetURI.js
+++ b/browser/base/content/test/general/browser_URLBarSetURI.js
@@ -22,17 +22,17 @@ function nextTest() {
     test(function () {
       executeSoon(nextTest);
     });
   } else {
     executeSoon(finish);
   }
 }
 
-let tests = [
+var tests = [
   function revert(next) {
     loadTabInWindow(window, function (tab) {
       gURLBar.handleRevert();
       is(gURLBar.textValue, "example.com", "URL bar had user/pass stripped after reverting");
       gBrowser.removeTab(tab);
       next();
     });
   },
--- a/browser/base/content/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -15,31 +15,31 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
   "resource://gre/modules/FxAccounts.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
   "resource://gre/modules/FileUtils.jsm");
 
 const CHROME_BASE = "chrome://mochitests/content/browser/browser/base/content/test/general/";
 // Preference helpers.
-let changedPrefs = new Set();
+var changedPrefs = new Set();
 
 function setPref(name, value) {
   changedPrefs.add(name);
   Services.prefs.setCharPref(name, value);
 }
 
 registerCleanupFunction(function() {
   // Ensure we don't pollute prefs for next tests.
   for (let name of changedPrefs) {
     Services.prefs.clearUserPref(name);
   }
 });
 
-let gTests = [
+var gTests = [
 {
   desc: "Test the remote commands",
   teardown: function* () {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
   run: function* ()
   {
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -59,17 +59,17 @@ function setupPingArchive() {
     .loadSubScript(CHROME_BASE + "healthreport_pingData.js", scope);
 
   for (let p of scope.TEST_PINGS) {
     fakeTelemetryNow(p.date);
     p.id = yield scope.TelemetryController.submitExternalPing(p.type, p.payload);
   }
 }
 
-let gTests = [
+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",
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -13,27 +13,27 @@ thisTestLeaksUncaughtRejectionsAndShould
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "AboutHomeUtils",
   "resource:///modules/AboutHome.jsm");
 
 const TEST_CONTENT_HELPER = "chrome://mochitests/content/browser/browser/base/content/test/general/aboutHome_content_script.js";
-let gRightsVersion = Services.prefs.getIntPref("browser.rights.version");
+var gRightsVersion = Services.prefs.getIntPref("browser.rights.version");
 
 registerCleanupFunction(function() {
   // Ensure we don't pollute prefs for next tests.
   Services.prefs.clearUserPref("network.cookies.cookieBehavior");
   Services.prefs.clearUserPref("network.cookie.lifetimePolicy");
   Services.prefs.clearUserPref("browser.rights.override");
   Services.prefs.clearUserPref("browser.rights." + gRightsVersion + ".shown");
 });
 
-let gTests = [
+var gTests = [
 
 {
   desc: "Check that clearing cookies does not clear storage",
   setup: function ()
   {
     Cc["@mozilla.org/observer-service;1"]
       .getService(Ci.nsIObserverService)
       .notifyObservers(null, "cookie-changed", "cleared");
@@ -629,17 +629,17 @@ function promiseWaitForEvent(node, type,
   return new Promise((resolve) => {
     node.addEventListener(type, function listener(event) {
       node.removeEventListener(type, listener, capturing);
       resolve(event);
     }, capturing);
   });
 }
 
-let promisePrefsOpen = Task.async(function*() {
+var promisePrefsOpen = Task.async(function*() {
   info("Waiting for the preferences tab to open...");
   let event = yield promiseWaitForEvent(gBrowser.tabContainer, "TabOpen", true);
   let tab = event.target;
   yield promiseTabLoadEvent(tab);
   is(tab.linkedBrowser.currentURI.spec, "about:preferences#search", "Should have seen the prefs tab");
   gBrowser.removeTab(tab);
 });
 
--- a/browser/base/content/test/general/browser_action_keyword.js
+++ b/browser/base/content/test/general/browser_action_keyword.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let gOnSearchComplete = null;
+var gOnSearchComplete = null;
 
 function* promise_first_result(inputText) {
   yield promiseAutocompleteResultPopup(inputText);
 
   let firstResult = gURLBar.popup.richlistbox.firstChild;
   return firstResult;
 }
 
--- a/browser/base/content/test/general/browser_addCertException.js
+++ b/browser/base/content/test/general/browser_addCertException.js
@@ -17,17 +17,17 @@ function test() {
 // Attempt to load https://expired.example.com (which has an expired cert).
 function loadBadCertPage() {
   gBrowser.addProgressListener(certErrorProgressListener);
   gBrowser.selectedBrowser.loadURI("https://expired.example.com");
 }
 
 // The browser should load about:certerror. When This happens, click the
 // button to open the certificate exception dialog.
-let certErrorProgressListener = {
+var certErrorProgressListener = {
   buttonClicked: false,
 
   onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
       let self = this;
       // Can't directly call button.click() in onStateChange
       executeSoon(function() {
         let button = content.document.getElementById("exceptionDialogButton");
@@ -42,34 +42,34 @@ let certErrorProgressListener = {
       });
     }
   }
 };
 
 // When the certificate exception dialog has opened, click the button to add
 // an exception.
 const EXCEPTION_DIALOG_URI = "chrome://pippki/content/exceptionDialog.xul";
-let certExceptionDialogObserver = {
+var certExceptionDialogObserver = {
   observe: function(aSubject, aTopic, aData) {
     if (aTopic == "cert-exception-ui-ready") {
       Services.obs.removeObserver(this, "cert-exception-ui-ready");
       let certExceptionDialog = getDialog(EXCEPTION_DIALOG_URI);
       ok(certExceptionDialog, "found exception dialog");
       executeSoon(function() {
         gBrowser.selectedBrowser.addEventListener("load",
                                                   successfulLoadListener,
                                                   true);
         certExceptionDialog.documentElement.getButton("extra1").click();
       });
     }
   }
 };
 
 // Finally, we should successfully load https://expired.example.com.
-let successfulLoadListener = {
+var successfulLoadListener = {
   handleEvent: function() {
     gBrowser.selectedBrowser.removeEventListener("load", this, true);
     let certOverrideService = Cc["@mozilla.org/security/certoverride;1"]
                                 .getService(Ci.nsICertOverrideService);
     certOverrideService.clearValidityOverride("expired.example.com", -1);
     gBrowser.removeTab(gBrowser.selectedTab);
     finish();
   }
--- a/browser/base/content/test/general/browser_addKeywordSearch.js
+++ b/browser/base/content/test/general/browser_addKeywordSearch.js
@@ -1,21 +1,21 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let testData = [
+var testData = [
   /* baseURI, field name, expected */
   [ 'http://example.com/', 'q', 'http://example.com/?q=%s' ],
   [ 'http://example.com/new-path-here/', 'q', 'http://example.com/new-path-here/?q=%s' ],
   [ '', 'q', 'http://example.org/browser/browser/base/content/test/general/dummy_page.html?q=%s' ],
   // Tests for proper behaviour when called on a form whose action contains a question mark.
   [ 'http://example.com/search?oe=utf-8', 'q', 'http://example.com/search?oe=utf-8&q=%s' ],
 ];
 
-let mm = gBrowser.selectedBrowser.messageManager;
+var mm = gBrowser.selectedBrowser.messageManager;
 
 add_task(function*() {
   yield BrowserTestUtils.withNewTab({
     gBrowser,
     url: "http://example.org/browser/browser/base/content/test/general/dummy_page.html",
   }, function* (browser) {
     yield ContentTask.spawn(browser, null, function* () {
       let doc = content.document;
--- a/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js
+++ b/browser/base/content/test/general/browser_beforeunload_duplicate_dialogs.js
@@ -1,13 +1,13 @@
 const TEST_PAGE = "http://mochi.test:8888/browser/browser/base/content/test/general/file_double_close_tab.html";
 
-let expectingDialog = false;
-let wantToClose = true;
-let resolveDialogPromise;
+var expectingDialog = false;
+var wantToClose = true;
+var resolveDialogPromise;
 function onTabModalDialogLoaded(node) {
   ok(expectingDialog, "Should be expecting this dialog.");
   expectingDialog = false;
   if (wantToClose) {
     // This accepts the dialog, closing it
     node.Dialog.ui.button0.click();
   } else {
     // This keeps the page open
--- a/browser/base/content/test/general/browser_blockHPKP.js
+++ b/browser/base/content/test/general/browser_blockHPKP.js
@@ -53,27 +53,27 @@ function loadPinningPage() {
                                              successfulPinningPageListener,
                                              true);
 
   gBrowser.selectedBrowser.loadURI("https://" + kPinningDomain + kURLPath + "valid");
 }
 
 // After the site is pinned try to load with a subdomain site that should
 // fail to validate
-let successfulPinningPageListener = {
+var successfulPinningPageListener = {
   handleEvent: function() {
     gBrowser.selectedBrowser.removeEventListener("load", this, true);
     gBrowser.addProgressListener(certErrorProgressListener);
     gBrowser.selectedBrowser.loadURI("https://" + kBadPinningDomain);
   }
 };
 
 // The browser should load about:neterror, when this happens, proceed
 // to load the pinning domain again, this time removing the pinning information
-let certErrorProgressListener = {
+var certErrorProgressListener = {
   onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
       let textElement = content.document.getElementById("errorShortDescText");
       let text = textElement.innerHTML;
       ok(text.indexOf("mozilla_pkix_error_key_pinning_failure") > 0,
          "Got a pinning error page");
       gBrowser.removeProgressListener(this);
       gBrowser.selectedBrowser.addEventListener("load",
@@ -81,29 +81,29 @@ let certErrorProgressListener = {
                                                 true);
       gBrowser.selectedBrowser.loadURI("https://" + kPinningDomain + kURLPath + "zeromaxagevalid");
     }
   }
 };
 
 // After the pinning information has been removed (successful load) proceed
 // to load again with the invalid pin domain.
-let successfulPinningRemovalPageListener = {
+var successfulPinningRemovalPageListener = {
   handleEvent: function() {
     gBrowser.selectedBrowser.removeEventListener("load", this, true);
     gBrowser.selectedBrowser.addEventListener("load",
                                               successfulLoadListener,
                                               true);
 
     gBrowser.selectedBrowser.loadURI("https://" + kBadPinningDomain);
   }
 };
 
 // Finally, we should successfully load
 // https://bad.include-subdomains.pinning-dynamic.example.com.
-let successfulLoadListener = {
+var successfulLoadListener = {
   handleEvent: function() {
     gBrowser.selectedBrowser.removeEventListener("load", this, true);
     gBrowser.removeTab(gBrowser.selectedTab);
     ok(true, "load complete");
     finish();
   }
 };
--- a/browser/base/content/test/general/browser_bookmark_titles.js
+++ b/browser/base/content/test/general/browser_bookmark_titles.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/. */
 
 // This file is tests for the default titles that new bookmarks get.
 
-let tests = [
+var tests = [
     // Common page.
     ['http://example.com/browser/browser/base/content/test/general/dummy_page.html',
      'Dummy test page'],
     // Data URI.
     ['data:text/html;charset=utf-8,<title>test%20data:%20url</title>',
      'test data: url'],
     // about:neterror
     ['data:application/vnd.mozilla.xul+xml,',
--- a/browser/base/content/test/general/browser_bug1124271_readerModePinnedTab.js
+++ b/browser/base/content/test/general/browser_bug1124271_readerModePinnedTab.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Test that the reader mode button won't open in a new tab when clicked from a pinned tab
 
 const PREF = "reader.parse-on-load.enabled";
 
 const TEST_PATH = "http://example.com/browser/browser/base/content/test/general/";
 
-let readerButton = document.getElementById("reader-mode-button");
+var readerButton = document.getElementById("reader-mode-button");
 
 add_task(function* () {
   registerCleanupFunction(function() {
     Services.prefs.clearUserPref(PREF);
     while (gBrowser.tabs.length > 1) {
       gBrowser.removeCurrentTab();
     }
   });
--- a/browser/base/content/test/general/browser_bug356571.js
+++ b/browser/base/content/test/general/browser_bug356571.js
@@ -9,25 +9,25 @@ var didFail = false;
 // Override Alert to avoid blocking the test due to unknown protocol error
 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);
 
-let fakePromptServiceFactory = {
+var fakePromptServiceFactory = {
   createInstance: function(aOuter, aIid) {
     if (aOuter != null)
       throw Cr.NS_ERROR_NO_AGGREGATION;
     return promptService.QueryInterface(aIid);
   }
 };
 
-let promptService = {
+var promptService = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]),
   alert: function() {
     didFail = true;
   }
 };
 
 /* FIXME
 Cm.QueryInterface(Ci.nsIComponentRegistrar)
--- a/browser/base/content/test/general/browser_bug432599.js
+++ b/browser/base/content/test/general/browser_bug432599.js
@@ -66,25 +66,25 @@ function waitForStarChange(aValue, aCall
       BookmarkingUI.status != expectedStatus) {
     info("Waiting for star button change.");
     setTimeout(waitForStarChange, 50, aValue, aCallback);
     return;
   }
   aCallback();
 }
 
-let invokers = [invokeUsingStarButton, invokeUsingCtrlD];
-let currentInvoker = 0;
+var invokers = [invokeUsingStarButton, invokeUsingCtrlD];
+var currentInvoker = 0;
 
-let initialValue;
-let initialRemoveHidden;
+var initialValue;
+var initialRemoveHidden;
 
-let popupElement = document.getElementById("editBookmarkPanel");
-let titleElement = document.getElementById("editBookmarkPanelTitle");
-let removeElement = document.getElementById("editBookmarkPanelRemoveButton");
+var popupElement = document.getElementById("editBookmarkPanel");
+var titleElement = document.getElementById("editBookmarkPanelTitle");
+var removeElement = document.getElementById("editBookmarkPanelRemoveButton");
 
 function checkBookmarksPanel(invoker, phase)
 {
   let onPopupShown = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
       popupElement.removeEventListener("popupshown", arguments.callee, false);
       checkBookmarksPanel(invoker, phase + 1);
     }
--- a/browser/base/content/test/general/browser_bug435325.js
+++ b/browser/base/content/test/general/browser_bug435325.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /* Ensure that clicking the button in the Offline mode neterror page makes the browser go online. See bug 435325. */
 
-let proxyPrefValue;
+var proxyPrefValue;
 
 function test() {
   waitForExplicitFinish();
 
   let tab = gBrowser.selectedTab = gBrowser.addTab();
 
   // Go offline and disable the proxy and cache, then try to load the test URL.
   Services.io.offline = true;
--- a/browser/base/content/test/general/browser_bug491431.js
+++ b/browser/base/content/test/general/browser_bug491431.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let testPage = "data:text/plain,test bug 491431 Page";
+var testPage = "data:text/plain,test bug 491431 Page";
 
 function test() {
   waitForExplicitFinish();
 
   let newWin, tabA, tabB;
 
   // test normal close
   tabA = gBrowser.addTab(testPage);
--- a/browser/base/content/test/general/browser_bug537013.js
+++ b/browser/base/content/test/general/browser_bug537013.js
@@ -1,40 +1,40 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /* Tests for bug 537013 to ensure proper tab-sequestration of find bar. */
 
-let tabs = [];
-let texts = [
+var tabs = [];
+var texts = [
   "This side up.",
   "The world is coming to an end. Please log off.",
   "Klein bottle for sale. Inquire within.",
   "To err is human; to forgive is not company policy."
 ];
 
-let Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
-let HasFindClipboard = Clipboard.supportsFindClipboard();
+var Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
+var HasFindClipboard = Clipboard.supportsFindClipboard();
 
 function addTabWithText(aText, aCallback) {
   let newTab = gBrowser.addTab("data:text/html;charset=utf-8,<h1 id='h1'>" +
                                aText + "</h1>");
   tabs.push(newTab);
   gBrowser.selectedTab = newTab;
 }
 
 function setFindString(aString) {
   gFindBar.open();
   gFindBar._findField.focus();
   gFindBar._findField.select();
   EventUtils.sendString(aString);
   is(gFindBar._findField.value, aString, "Set the field correctly!");
 }
 
-let newWindow;
+var newWindow;
 
 function test() {
   waitForExplicitFinish();
   registerCleanupFunction(function () {
     while (tabs.length) {
       gBrowser.removeTab(tabs.pop());
     }
   });
--- a/browser/base/content/test/general/browser_bug556061.js
+++ b/browser/base/content/test/general/browser_bug556061.js
@@ -1,16 +1,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/. */
 
-let testURL = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
-let testActionURL = "moz-action:switchtab," + JSON.stringify({url: testURL});
+var testURL = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
+var testActionURL = "moz-action:switchtab," + JSON.stringify({url: testURL});
 testURL = gURLBar.trimValue(testURL);
-let testTab;
+var testTab;
 
 function runNextTest() {
   if (tests.length) {
     let t = tests.shift();
     waitForClipboard(t.expected, t.setup, function() {
       t.success();
       runNextTest();
     }, cleanup);
@@ -20,17 +20,17 @@ function runNextTest() {
   }
 }
 
 function cleanup() {
   gBrowser.removeTab(testTab);
   finish();
 }
 
-let tests = [
+var tests = [
   {
     expected: testURL,
     setup: function() {
       gURLBar.value = testActionURL;
       gURLBar.valueIsTyped = true;
       is(gURLBar.value, testActionURL, "gURLBar starts with the correct real value");
       is(gURLBar.textValue, testURL, "gURLBar starts with the correct display value");
 
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -9,17 +9,17 @@ function checkPopupShow()
 }
 
 function checkPopupHide()
 {
   ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
      "[Test " + testId + "] The invalid form popup should not be shown");
 }
 
-let gObserver = {
+var gObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
 
   notifyInvalidSubmit : function (aFormElement, aInvalidElements)
   {
   }
 };
 
 var testId = 0;
--- a/browser/base/content/test/general/browser_bug565667.js
+++ b/browser/base/content/test/general/browser_bug565667.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let fm = Services.focus;
+var fm = Services.focus;
 
 function test() {
   waitForExplicitFinish();
   // Open the javascript console. It has the mac menu overlay, so browser.js is
   // loaded in it.
   let consoleWin = window.open("chrome://global/content/console.xul", "_blank",
                                "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
   testWithOpenWindow(consoleWin);
--- a/browser/base/content/test/general/browser_bug567306.js
+++ b/browser/base/content/test/general/browser_bug567306.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 const {Ci: interfaces, Cc: classes} = Components;
 
-let Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
-let HasFindClipboard = Clipboard.supportsFindClipboard();
+var Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
+var HasFindClipboard = Clipboard.supportsFindClipboard();
 
 add_task(function* () {
   let newwindow = yield BrowserTestUtils.openNewBrowserWindow();
 
   let selectedBrowser = newwindow.gBrowser.selectedBrowser;
   yield new Promise((resolve, reject) => {
     selectedBrowser.addEventListener("pageshow", function pageshowListener() {
       if (selectedBrowser.currentURI.spec == "about:blank")
--- a/browser/base/content/test/general/browser_bug575561.js
+++ b/browser/base/content/test/general/browser_bug575561.js
@@ -34,33 +34,33 @@ add_task(function*() {
   // Tests link to data:text/html,<!DOCTYPE html><html><body>Another Page</body></html>
   yield testLink(5, true, false);
 
   // Pinned: Link to an about: URI should not open a new tab
   // Tests link to about:mozilla
   yield testLink(6, true, false);
 });
 
-let waitForPageLoad = Task.async(function*(browser, linkLocation) {
+var waitForPageLoad = Task.async(function*(browser, linkLocation) {
   yield waitForDocLoadComplete();
 
   is(browser.contentDocument.location.href, linkLocation, "Link should not open in a new tab");
 });
 
-let waitForTabOpen = Task.async(function*() {
+var waitForTabOpen = Task.async(function*() {
   let event = yield promiseWaitForEvent(gBrowser.tabContainer, "TabOpen", true);
   ok(true, "Link should open a new tab");
 
   yield waitForDocLoadComplete(event.target.linkedBrowser);
   yield Promise.resolve();
 
   gBrowser.removeCurrentTab();
 });
 
-let testLink = Task.async(function*(aLinkIndex, pinTab, expectNewTab, testSubFrame) {
+var testLink = Task.async(function*(aLinkIndex, pinTab, expectNewTab, testSubFrame) {
   let appTab = gBrowser.addTab(TEST_URL, {skipAnimation: true});
   if (pinTab)
     gBrowser.pinTab(appTab);
   gBrowser.selectedTab = appTab;
 
   yield waitForDocLoadComplete();
 
   let browser = appTab.linkedBrowser;
--- a/browser/base/content/test/general/browser_bug581253.js
+++ b/browser/base/content/test/general/browser_bug581253.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-let testURL = "data:text/plain,nothing but plain text";
-let testTag = "581253_tag";
-let timerID = -1;
+var testURL = "data:text/plain,nothing but plain text";
+var testTag = "581253_tag";
+var timerID = -1;
 
 function test() {
   registerCleanupFunction(function() {
     PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
     if (timerID > 0) {
       clearTimeout(timerID);
     }
   });
--- a/browser/base/content/test/general/browser_bug585558.js
+++ b/browser/base/content/test/general/browser_bug585558.js
@@ -1,13 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-let tabs = [];
+var tabs = [];
 
 function addTab(aURL) {
   tabs.push(gBrowser.addTab(aURL, {skipAnimation: true}));
 }
 
 function testAttrib(elem, attrib, attribValue, msg) {
   is(elem.hasAttribute(attrib), attribValue, msg);
 }
--- a/browser/base/content/test/general/browser_bug678392.js
+++ b/browser/base/content/test/general/browser_bug678392.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let HTTPROOT = "http://example.com/browser/browser/base/content/test/general/";
+var HTTPROOT = "http://example.com/browser/browser/base/content/test/general/";
 
 function maxSnapshotOverride() {
   return 5;
 }
 
 function test() {
   waitForExplicitFinish();
 
--- a/browser/base/content/test/general/browser_bug906190.js
+++ b/browser/base/content/test/general/browser_bug906190.js
@@ -50,24 +50,24 @@
 
 const PREF_ACTIVE = "security.mixed_content.block_active_content";
 
 // We use the different urls for testing same origin checks before allowing
 // mixed content on child tabs.
 const gHttpTestRoot1 = "https://test1.example.com/browser/browser/base/content/test/general/";
 const gHttpTestRoot2 = "https://test2.example.com/browser/browser/base/content/test/general/";
 
-let origBlockActive;
-let gTestWin = null;
-let mainTab = null;
-let curClickHandler = null;
-let curContextMenu = null;
-let curTestFunc = null;
-let curTestName = null;
-let curChildTabLink = null;
+var origBlockActive;
+var gTestWin = null;
+var mainTab = null;
+var curClickHandler = null;
+var curContextMenu = null;
+var curTestFunc = null;
+var curTestName = null;
+var curChildTabLink = null;
 
 //------------------------ Helper Functions ---------------------
 
 registerCleanupFunction(function() {
   // Set preferences back to their original values
   Services.prefs.setBoolPref(PREF_ACTIVE, origBlockActive);
 });
 requestLongerTimeout(2);
@@ -91,28 +91,28 @@ function waitForCondition(condition, nex
   var moveOn = function() {
     clearInterval(interval); nextTest();
   };
 }
 
 // The purpose of this function is to simulate |CTRL+CLICK|.
 // The clickHandler intercepts simulated user clicks and performs
 // the |contentAreaClick| which dispatches to handleLinkClick.
-let clickHandler = function (aEvent, aFunc) {
+var clickHandler = function (aEvent, aFunc) {
   gTestWin.gBrowser.removeEventListener("click", curClickHandler, true);
   gTestWin.contentAreaClick(aEvent, true);
   waitForSomeTabToLoad(aFunc);
   aEvent.preventDefault();
   aEvent.stopPropagation();
 }
 
 // The purpose of this function is to simulate |RIGHT-CLICK|->|OPEN LINK IN TAB|
 // Once the contextmenu opens, this functions selects 'open link in tab'
 // from the contextmenu which dispatches to the function openLinkInTab.
-let contextMenuOpenHandler = function(aEvent, aFunc) {
+var contextMenuOpenHandler = function(aEvent, aFunc) {
   gTestWin.document.removeEventListener("popupshown", curContextMenu, false);
   waitForSomeTabToLoad(aFunc);
   var openLinkInTabCommand = gTestWin.document.getElementById("context-openlinkintab");
   openLinkInTabCommand.doCommand();
   aEvent.target.hidePopup();
 };
 
 function setUpTest(aTestName, aIDForNextTest, aFuncForNextTest, aChildTabLink) {
--- a/browser/base/content/test/general/browser_clipboard.js
+++ b/browser/base/content/test/general/browser_clipboard.js
@@ -1,12 +1,12 @@
 // This test is used to check copy and paste in editable areas to ensure that non-text
 // types (html and images) are copied to and pasted from the clipboard properly.
 
-let testPage = "<body style='margin: 0'><img id='img' tabindex='1' src='http://example.org/browser/browser/base/content/test/general/moz.png'>" +
+var testPage = "<body style='margin: 0'><img id='img' tabindex='1' src='http://example.org/browser/browser/base/content/test/general/moz.png'>" +
                "  <div id='main' contenteditable='true'>Test <b>Bold</b> After Text</div>" +
                "</body>";
 
 add_task(function*() {
   let tab = gBrowser.addTab();
   let browser = gBrowser.getBrowserForTab(tab);
 
   gBrowser.selectedTab = tab;
--- a/browser/base/content/test/general/browser_contentAreaClick.js
+++ b/browser/base/content/test/general/browser_contentAreaClick.js
@@ -9,17 +9,17 @@
  * The test opens a new browser window, then replaces browser.js methods invoked
  * by contentAreaClick with a mock function that tracks which methods have been
  * called.
  * Each sub-test synthesizes a mouse click event on links injected in content,
  * the event is collected by a click handler that ensures that contentAreaClick
  * correctly prevent default events, and follows the correct code path.
  */
 
-let gTests = [
+var gTests = [
 
   {
     desc: "Simple left click",
     setup: function() {},
     clean: function() {},
     event: {},
     targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ],
     expectedInvokedMethods: [],
@@ -155,34 +155,34 @@ let gTests = [
     targets: [ "emptylink" ],
     expectedInvokedMethods: [ "middleMousePaste" ],
     preventDefault: true,
   },
 
 ];
 
 // Array of method names that will be replaced in the new window.
-let gReplacedMethods = [
+var gReplacedMethods = [
   "middleMousePaste",
   "urlSecurityCheck",
   "loadURI",
   "gatherTextUnder",
   "saveURL",
   "openLinkIn",
   "getShortcutOrURIAndPostData",
 ];
 
 // Reference to the new window.
-let gTestWin = null;
+var gTestWin = null;
 
 // List of methods invoked by a specific call to contentAreaClick.
-let gInvokedMethods = [];
+var gInvokedMethods = [];
 
 // The test currently running.
-let gCurrentTest = null;
+var gCurrentTest = null;
 
 function test() {
   waitForExplicitFinish();
 
   gTestWin = openDialog(location, "", "chrome,all,dialog=no", "about:blank");
   whenDelayedStartupFinished(gTestWin, function () {
     info("Browser window opened");
     waitForFocus(function() {
@@ -193,17 +193,17 @@ function test() {
         info("Running tests...");
         executeSoon(runNextTest);
       }, gTestWin.content, true);
     }, gTestWin);
   });
 }
 
 // Click handler used to steal click events.
-let gClickHandler = {
+var gClickHandler = {
   handleEvent: function (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;
--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -634,17 +634,17 @@ add_task(function* settings() {
   yield msg("key", "VK_UP");
   let p = msg("waitForSearchSettings");
   yield msg("key", "VK_RETURN");
   yield p;
 
   yield msg("reset");
 });
 
-let gDidInitialSetUp = false;
+var gDidInitialSetUp = false;
 
 function setUp(aNoEngine) {
   return Task.spawn(function* () {
     if (!gDidInitialSetUp) {
       Cu.import("resource:///modules/ContentSearch.jsm");
       let originalOnMessageSearch = ContentSearch._onMessageSearch;
       let originalOnMessageManageEngines = ContentSearch._onMessageManageEngines;
       ContentSearch._onMessageSearch = () => {};
--- a/browser/base/content/test/general/browser_datachoices_notification.js
+++ b/browser/base/content/test/general/browser_datachoices_notification.js
@@ -1,18 +1,18 @@
 /* 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/. */
 
 "use strict";
 
 // Pass an empty scope object to the import to prevent "leaked window property"
 // errors in tests.
-let Preferences = Cu.import("resource://gre/modules/Preferences.jsm", {}).Preferences;
-let TelemetryReportingPolicy =
+var Preferences = Cu.import("resource://gre/modules/Preferences.jsm", {}).Preferences;
+var TelemetryReportingPolicy =
   Cu.import("resource://gre/modules/TelemetryReportingPolicy.jsm", {}).TelemetryReportingPolicy;
 
 XPCOMUtils.defineLazyGetter(this, "gDatareportingService",
   () => Cc["@mozilla.org/datareporting/service;1"]
           .getService(Ci.nsISupports)
           .wrappedJSObject);
 
 const PREF_BRANCH = "datareporting.policy.";
@@ -79,17 +79,17 @@ function triggerInfoBar(expectedTimeoutM
   sendSessionRestoredNotification();
   Assert.ok(!!showInfobarCallback, "Must have a timer callback.");
   if (expectedTimeoutMs !== undefined) {
     Assert.equal(timeoutMs, expectedTimeoutMs, "Timeout should match");
   }
   showInfobarCallback();
 }
 
-let checkInfobarButton = Task.async(function* (aNotification) {
+var checkInfobarButton = Task.async(function* (aNotification) {
   // Check that the button on the data choices infobar does the right thing.
   let buttons = aNotification.getElementsByTagName("button");
   Assert.equal(buttons.length, 1, "There is 1 button in the data reporting notification.");
   let button = buttons[0];
 
   // Add an observer to ensure the "advanced" pane opened (but don't bother
   // closing it - we close the entire window when done.)
   let paneLoadedPromise = promiseTopicObserved("advanced-pane-loaded");
--- a/browser/base/content/test/general/browser_datareporting_notification.js
+++ b/browser/base/content/test/general/browser_datareporting_notification.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let originalPolicy = null;
+var originalPolicy = null;
 
 /**
  * Display a datareporting notification to the user.
  *
  * @param  {String} name
  */
 function sendNotifyRequest(name) {
   let ns = {};
@@ -42,17 +42,17 @@ function sendNotifyRequest(name) {
       deferred.resolve.bind(deferred),
       deferred.reject.bind(deferred)
     );
   }.bind(this), deferred.reject.bind(deferred));
 
   return [policy, deferred.promise];
 }
 
-let dumpAppender, rootLogger;
+var dumpAppender, rootLogger;
 
 function test() {
   registerCleanupFunction(cleanup);
   waitForExplicitFinish();
 
   let ns = {};
   Components.utils.import("resource://gre/modules/Log.jsm", ns);
   rootLogger = ns.Log.repository.rootLogger;
--- a/browser/base/content/test/general/browser_devices_get_user_media.js
+++ b/browser/base/content/test/general/browser_devices_get_user_media.js
@@ -220,17 +220,17 @@ function* checkNotSharing() {
   ok(!PopupNotifications.getNotification("webRTC-sharingDevices"),
      "no webRTC-sharingDevices popup notification");
 
   yield* assertWebRTCIndicatorStatus(null);
 }
 
 const permissionError = "error: PermissionDeniedError: The user did not grant permission for the operation.";
 
-let gTests = [
+var gTests = [
 
 {
   desc: "getUserMedia audio+video",
   run: function checkAudioVideo() {
     yield promisePopupNotificationShown("webRTC-shareDevices", () => {
       info("requesting devices");
       content.wrappedJSObject.requestDevice(true, true);
     });
--- a/browser/base/content/test/general/browser_devices_get_user_media_about_urls.js
+++ b/browser/base/content/test/general/browser_devices_get_user_media_about_urls.js
@@ -213,32 +213,32 @@ fakeLoopAboutModule.prototype = {
   },
   getURIFlags: function (aURI) {
     return Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT |
            Ci.nsIAboutModule.ALLOW_SCRIPT |
            Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT;
   }
 };
 
-let factory = XPCOMUtils._getFactory(fakeLoopAboutModule);
-let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
+var factory = XPCOMUtils._getFactory(fakeLoopAboutModule);
+var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
 
-let originalLoopCsp = Services.prefs.getCharPref(PREF_LOOP_CSP);
+var originalLoopCsp = Services.prefs.getCharPref(PREF_LOOP_CSP);
 registerCleanupFunction(function() {
   gBrowser.removeCurrentTab();
   kObservedTopics.forEach(topic => {
     Services.obs.removeObserver(observer, topic);
   });
   Services.prefs.clearUserPref(PREF_PERMISSION_FAKE);
   Services.prefs.setCharPref(PREF_LOOP_CSP, originalLoopCsp);
 });
 
 const permissionError = "error: PermissionDeniedError: The user did not grant permission for the operation.";
 
-let gTests = [
+var gTests = [
 
 {
   desc: "getUserMedia about:loopconversation shouldn't prompt",
   run: function checkAudioVideoLoop() {
     Services.prefs.setCharPref(PREF_LOOP_CSP, "default-src 'unsafe-inline'");
 
     let classID = Cc["@mozilla.org/uuid-generator;1"]
                     .getService(Ci.nsIUUIDGenerator).generateUUID();
--- a/browser/base/content/test/general/browser_devices_get_user_media_in_frame.js
+++ b/browser/base/content/test/general/browser_devices_get_user_media_in_frame.js
@@ -218,17 +218,17 @@ function* checkNotSharing() {
 }
 
 function getFrameGlobal(aFrameId) {
   return content.wrappedJSObject.document.getElementById(aFrameId).contentWindow;
 }
 
 const permissionError = "error: PermissionDeniedError: The user did not grant permission for the operation.";
 
-let gTests = [
+var gTests = [
 
 {
   desc: "getUserMedia audio+video",
   run: function checkAudioVideo() {
     let global = getFrameGlobal("frame1");
     yield promisePopupNotificationShown("webRTC-shareDevices", () => {
       info("requesting devices");
       global.requestDevice(true, true);
--- a/browser/base/content/test/general/browser_documentnavigation.js
+++ b/browser/base/content/test/general/browser_documentnavigation.js
@@ -1,19 +1,19 @@
 /*
  * This test checks that focus is adjusted properly in a browser when pressing F6 and Shift+F6.
  * There are additional tests in dom/tests/mochitest/chrome/test_focus_docnav.xul which test
  * non-browser cases.
  */
 
-let testPage1 = "data:text/html,<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
-let testPage2 = "data:text/html,<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
-let testPage3 = "data:text/html,<html id='html3'><body id='body3' contenteditable='true'><button id='button3'>Tab 3</button></body></html>";
+var testPage1 = "data:text/html,<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
+var testPage2 = "data:text/html,<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
+var testPage3 = "data:text/html,<html id='html3'><body id='body3' contenteditable='true'><button id='button3'>Tab 3</button></body></html>";
 
-let fm = Services.focus;
+var fm = Services.focus;
 
 function* expectFocusOnF6(backward, expectedDocument, expectedElement, onContent, desc)
 {
   let focusChangedInChildResolver = null;
   let focusPromise = onContent ? new Promise(resolve => focusChangedInChildResolver = resolve) :
                                  BrowserTestUtils.waitForEvent(window, "focus", true);
 
   function focusChangedListener(msg) {
--- a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
+++ b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
@@ -1,11 +1,11 @@
 "use strict";
 
-let gMessageManager;
+var gMessageManager;
 
 function frameScript() {
   addMessageListener("Test:RequestFullscreen", () => {
     content.document.body.mozRequestFullScreen();
   });
   addMessageListener("Test:ExitFullscreen", () => {
     content.document.mozCancelFullScreen();
   });
@@ -91,17 +91,17 @@ function waitForFullscreenChanges(aFlags
           "Test:FullscreenChanged", captureUnexpectedFullscreenChange);
         fullscreenData = data;
         tryResolve();
       });
     }
   });
 }
 
-let gTests = [
+var gTests = [
   {
     desc: "document method",
     affectsFullscreenMode: false,
     exitFunc: () => {
       gMessageManager.sendAsyncMessage("Test:ExitFullscreen");
     }
   },
   {
--- a/browser/base/content/test/general/browser_double_close_tab.js
+++ b/browser/base/content/test/general/browser_double_close_tab.js
@@ -1,11 +1,11 @@
 "use strict";
 const TEST_PAGE = "http://mochi.test:8888/browser/browser/base/content/test/general/file_double_close_tab.html";
-let testTab;
+var testTab;
 
 function waitForDialog(callback) {
   function onTabModalDialogLoaded(node) {
     Services.obs.removeObserver(onTabModalDialogLoaded, "tabmodal-dialog-loaded");
     callback(node);
   }
 
   // Listen for the dialog being created
--- a/browser/base/content/test/general/browser_e10s_about_process.js
+++ b/browser/base/content/test/general/browser_e10s_about_process.js
@@ -44,17 +44,17 @@ AboutModule.prototype = {
 
   getIndexedDBOriginPostfix: function(aURI) {
     return null;
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule])
 };
 
-let AboutModuleFactory = {
+var AboutModuleFactory = {
   createInstance: function(aOuter, aIID) {
     if (aOuter)
       throw Components.results.NS_ERROR_NO_AGGREGATION;
     return new AboutModule().QueryInterface(aIID);
   },
 
   lockFactory: function(aLock) {
     throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
--- a/browser/base/content/test/general/browser_e10s_chrome_process.js
+++ b/browser/base/content/test/general/browser_e10s_chrome_process.js
@@ -79,17 +79,17 @@ add_task(function* test_any() {
   test_url(CANREMOTE, true, true);
 });
 
 add_task(function* test_remote() {
   test_url(MUSTREMOTE, false, true);
 });
 
 // The set of page transitions
-let TESTS = [
+var TESTS = [
   [
     "chrome -> chrome",
     CHROME, false,
     CHROME, false,
   ],
   [
     "chrome -> canremote",
     CHROME, false,
@@ -113,17 +113,17 @@ let TESTS = [
   [
     "remote -> mustremote",
     MUSTREMOTE, true,
     MUSTREMOTE, true,
   ],
 ];
 
 // The different ways to transition from one page to another
-let TRANSITIONS = [
+var TRANSITIONS = [
 // Loads the new page by calling browser.loadURI directly
 function* loadURI(browser, uri) {
   info("Calling browser.loadURI");
   yield BrowserTestUtils.loadURI(browser, uri);
   return true;
 },
 
 // Loads the new page by finding a link with the right href in the document and
--- a/browser/base/content/test/general/browser_e10s_switchbrowser.js
+++ b/browser/base/content/test/general/browser_e10s_switchbrowser.js
@@ -30,17 +30,17 @@ function get_remote_history(browser) {
       browser.messageManager.removeMessageListener("Test:History", listener);
       resolve(data);
     });
 
     browser.messageManager.loadFrameScript("data:,(" + frame_script.toString() + ")();", true);
   });
 }
 
-let check_history = Task.async(function*() {
+var check_history = Task.async(function*() {
   let sessionHistory = yield get_remote_history(gBrowser.selectedBrowser);
 
   let count = sessionHistory.entries.length;
   is(count, gExpectedHistory.entries.length, "Should have the right number of history entries");
   is(sessionHistory.index, gExpectedHistory.index, "Should have the right history index");
 
   for (let i = 0; i < count; i++) {
     let entry = sessionHistory.entries[i];
@@ -50,31 +50,31 @@ let check_history = Task.async(function*
 });
 
 function clear_history() {
   gExpectedHistory.index = -1;
   gExpectedHistory.entries = [];
 }
 
 // Waits for a load and updates the known history
-let waitForLoad = Task.async(function*(uri) {
+var waitForLoad = Task.async(function*(uri) {
   info("Loading " + uri);
   // Longwinded but this ensures we don't just shortcut to LoadInNewProcess
   gBrowser.selectedBrowser.webNavigation.loadURI(uri, Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null);
 
   yield waitForDocLoadComplete();
   gExpectedHistory.index++;
   gExpectedHistory.entries.push({
     uri: gBrowser.currentURI.spec,
     title: gBrowser.contentTitle
   });
 });
 
 // Waits for a load and updates the known history
-let waitForLoadWithFlags = Task.async(function*(uri, flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE) {
+var waitForLoadWithFlags = Task.async(function*(uri, flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE) {
   info("Loading " + uri + " flags = " + flags);
   gBrowser.selectedBrowser.loadURIWithFlags(uri, flags, null, null, null);
 
   yield waitForDocLoadComplete();
   if (!(flags & Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY)) {
 
     if (flags & Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY) {
       gExpectedHistory.entries.pop();
@@ -85,24 +85,24 @@ let waitForLoadWithFlags = Task.async(fu
 
     gExpectedHistory.entries.push({
       uri: gBrowser.currentURI.spec,
       title: gBrowser.contentTitle
     });
   }
 });
 
-let back = Task.async(function*() {
+var back = Task.async(function*() {
   info("Going back");
   gBrowser.goBack();
   yield waitForDocLoadComplete();
   gExpectedHistory.index--;
 });
 
-let forward = Task.async(function*() {
+var forward = Task.async(function*() {
   info("Going forward");
   gBrowser.goForward();
   yield waitForDocLoadComplete();
   gExpectedHistory.index++;
 });
 
 // Tests that navigating from a page that should be in the remote process and
 // a page that should be in the main process works and retains history
--- a/browser/base/content/test/general/browser_findbarClose.js
+++ b/browser/base/content/test/general/browser_findbarClose.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests find bar auto-close behavior
 
-let newTab, iframe;
+var newTab, iframe;
 
 function test() {
   waitForExplicitFinish();
   newTab = gBrowser.addTab("about:blank");
   newTab.linkedBrowser.addEventListener("DOMContentLoaded",
     prepareTestFindBarStaysOpenOnSubdocumentLocationChange, false);
   newTab.linkedBrowser.contentWindow.location = "http://example.com/browser/" +
     "browser/base/content/test/general/test_bug628179.html";
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -1,13 +1,13 @@
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
-let Cc = Components.classes;
-let Ci = Components.interfaces;
+var Cc = Components.classes;
+var Ci = Components.interfaces;
 
 const PREF_DISABLE_OPEN_NEW_WINDOW = "browser.link.open_newwindow.disabled_in_fullscreen";
 const isOSX = (Services.appinfo.OS === "Darwin");
 
 const TEST_FILE = "file_fullscreen-window-open.html";
 const gHttpTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
                                                           "http://127.0.0.1:8888/");
 
@@ -35,17 +35,17 @@ registerCleanupFunction(function(){
   // Exit browser fullscreen mode.
   BrowserFullScreen();
 
   gBrowser.removeCurrentTab();
 
   Services.prefs.clearUserPref(PREF_DISABLE_OPEN_NEW_WINDOW);
 });
 
-let gTests = [
+var gTests = [
   test_open,
   test_open_with_size,
   test_open_with_pos,
   test_open_with_outerSize,
   test_open_with_innerSize,
   test_open_with_dialog,
   test_open_when_open_new_window_by_pref,
   test_open_with_pref_to_disable_in_fullscreen,
--- a/browser/base/content/test/general/browser_fxa_migrate.js
+++ b/browser/base/content/test/general/browser_fxa_migrate.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const STATE_CHANGED_TOPIC = "fxa-migration:state-changed";
 const NOTIFICATION_TITLE = "fxa-migration";
 
-let imports = {};
+var imports = {};
 Cu.import("resource://services-sync/FxaMigrator.jsm", imports);
 
 add_task(function* test() {
   // Fake the state where we need an FxA user.
   let fxaPanelUIPromise = promiseButtonMutation();
   Services.obs.notifyObservers(null, STATE_CHANGED_TOPIC,
                                imports.fxaMigrator.STATE_USER_FXA);
   let buttonState = yield fxaPanelUIPromise;
--- a/browser/base/content/test/general/browser_fxa_oauth.js
+++ b/browser/base/content/test/general/browser_fxa_oauth.js
@@ -14,17 +14,17 @@ Cu.import("resource://gre/modules/Task.j
 
 XPCOMUtils.defineLazyModuleGetter(this, "FxAccountsOAuthClient",
   "resource://gre/modules/FxAccountsOAuthClient.jsm");
 
 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";
 
-let gTests = [
+var gTests = [
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow",
     run: function () {
       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",
--- a/browser/base/content/test/general/browser_fxa_web_channel.js
+++ b/browser/base/content/test/general/browser_fxa_web_channel.js
@@ -9,23 +9,23 @@ XPCOMUtils.defineLazyGetter(this, "FxAcc
   return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
 });
 
 XPCOMUtils.defineLazyModuleGetter(this, "WebChannel",
                                   "resource://gre/modules/WebChannel.jsm");
 
 // FxAccountsWebChannel isn't explicitly exported by FxAccountsWebChannel.jsm
 // but we can get it here via a backstage pass.
-let {FxAccountsWebChannel} = Components.utils.import("resource://gre/modules/FxAccountsWebChannel.jsm", {});
+var {FxAccountsWebChannel} = Components.utils.import("resource://gre/modules/FxAccountsWebChannel.jsm", {});
 
 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";
 
-let gTests = [
+var gTests = [
   {
     desc: "FxA Web Channel - should receive message about profile changes",
     run: function* () {
       let client = new FxAccountsWebChannel({
         content_uri: TEST_HTTP_PATH,
         channel_id: TEST_CHANNEL_ID,
       });
       let promiseObserver = new Promise((resolve, reject) => {
--- a/browser/base/content/test/general/browser_fxaccounts.js
+++ b/browser/base/content/test/general/browser_fxaccounts.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let {Log} = Cu.import("resource://gre/modules/Log.jsm", {});
-let {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
-let {fxAccounts} = Cu.import("resource://gre/modules/FxAccounts.jsm", {});
-let FxAccountsCommon = {};
+var {Log} = Cu.import("resource://gre/modules/Log.jsm", {});
+var {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
+var {fxAccounts} = Cu.import("resource://gre/modules/FxAccounts.jsm", {});
+var FxAccountsCommon = {};
 Cu.import("resource://gre/modules/FxAccountsCommon.js", FxAccountsCommon);
 
 const TEST_ROOT = "http://example.com/browser/browser/base/content/test/general/";
 
 // instrument gFxAccounts to send observer notifications when it's done
 // what it does.
 (function() {
   let unstubs = {}; // The original functions we stub out.
@@ -39,17 +39,17 @@ const TEST_ROOT = "http://example.com/br
     for (let name in unstubs) {
       gFxAccounts[name] = unstubs[name];
     }
     stubs = unstubs = null;
   });
 })();
 
 // Other setup/cleanup
-let newTab;
+var newTab;
 
 Services.prefs.setCharPref("identity.fxaccounts.remote.signup.uri",
                            TEST_ROOT + "accounts_testRemoteCommands.html");
 
 registerCleanupFunction(() => {
   Services.prefs.clearUserPref("identity.fxaccounts.remote.signup.uri");
   Services.prefs.clearUserPref("identity.fxaccounts.remote.profile.uri");
   gBrowser.removeTab(newTab);
@@ -59,19 +59,19 @@ add_task(function* initialize() {
   // Set a new tab with something other than about:blank, so it doesn't get reused.
   // We must wait for it to load or the promiseTabOpen() call in the next test
   // gets confused.
   newTab = gBrowser.selectedTab = gBrowser.addTab("about:mozilla", {animate: false});
   yield promiseTabLoaded(newTab);
 });
 
 // The elements we care about.
-let panelUILabel = document.getElementById("PanelUI-fxa-label");
-let panelUIStatus = document.getElementById("PanelUI-fxa-status");
-let panelUIFooter = document.getElementById("PanelUI-footer-fxa");
+var panelUILabel = document.getElementById("PanelUI-fxa-label");
+var panelUIStatus = document.getElementById("PanelUI-fxa-status");
+var panelUIFooter = document.getElementById("PanelUI-footer-fxa");
 
 // The tests
 add_task(function* test_nouser() {
   let user = yield fxAccounts.getSignedInUser();
   Assert.strictEqual(user, null, "start with no user signed in");
   let promiseUpdateDone = promiseObserver("test:browser_fxaccounts:updateAppMenuItem");
   Services.obs.notifyObservers(null, this.FxAccountsCommon.ONLOGOUT_NOTIFICATION, null);
   yield promiseUpdateDone;
@@ -198,17 +198,17 @@ function promiseWaitForEvent(node, type,
   return new Promise((resolve) => {
     node.addEventListener(type, function listener(event) {
       node.removeEventListener(type, listener, capturing);
       resolve(event);
     }, capturing);
   });
 }
 
-let promiseTabOpen = Task.async(function*(urlBase) {
+var promiseTabOpen = Task.async(function*(urlBase) {
   info("Waiting for tab to open...");
   let event = yield promiseWaitForEvent(gBrowser.tabContainer, "TabOpen", true);
   let tab = event.target;
   yield promiseTabLoadEvent(tab);
   ok(tab.linkedBrowser.currentURI.spec.startsWith(urlBase),
      "Got " + tab.linkedBrowser.currentURI.spec + ", expecting " + urlBase);
   let whenUnloaded = promiseTabUnloaded(tab);
   gBrowser.removeTab(tab);
@@ -242,17 +242,17 @@ function setSignedInUser(verified) {
     oauthTokens: {
       // a token for the profile server.
       profile: "key value",
     }
   }
   return fxAccounts.setSignedInUser(data);
 }
 
-let signOut = Task.async(function* () {
+var signOut = Task.async(function* () {
   // This test needs to make sure that any updates for the logout have
   // completed before starting the next test, or we see the observer
   // notifications get out of sync.
   let promiseUpdateDone = promiseObserver("test:browser_fxaccounts:updateAppMenuItem");
   // we always want a "localOnly" signout here...
   yield fxAccounts.signOut(true);
   yield promiseUpdateDone;
 });
--- a/browser/base/content/test/general/browser_gestureSupport.js
+++ b/browser/base/content/test/general/browser_gestureSupport.js
@@ -3,19 +3,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // Simple gestures tests
 //
 // These tests require the ability to disable the fact that the
 // Firefox chrome intentionally prevents "simple gesture" events from
 // reaching web content.
 
-let test_utils;
-let test_commandset;
-let test_prefBranch = "browser.gesture.";
+var test_utils;
+var test_commandset;
+var test_prefBranch = "browser.gesture.";
 
 function test()
 {
   waitForExplicitFinish();
 
   // Disable the default gestures support during the test
   gGestureSupport.init(false);
 
@@ -34,23 +34,23 @@ function test()
   // Test Firefox's gestures support.
   test_commandset = document.getElementById("mainCommandSet");
   test_swipeGestures();
   test_latchedGesture("pinch", "out", "in", "MozMagnifyGesture");
   test_thresholdGesture("pinch", "out", "in", "MozMagnifyGesture");
   test_rotateGestures();
 }
 
-let test_eventCount = 0;
-let test_expectedType;
-let test_expectedDirection;
-let test_expectedDelta;
-let test_expectedModifiers;
-let test_expectedClickCount;
-let test_imageTab;
+var test_eventCount = 0;
+var test_expectedType;
+var test_expectedDirection;
+var test_expectedDelta;
+var test_expectedModifiers;
+var test_expectedClickCount;
+var test_imageTab;
 
 function test_gestureListener(evt)
 {
   is(evt.type, test_expectedType,
      "evt.type (" + evt.type + ") does not match expected value");
   is(evt.target, test_utils.elementFromPoint(20, 20, false, false),
      "evt.target (" + evt.target + ") does not match expected value");
   is(evt.clientX, 20,
--- a/browser/base/content/test/general/browser_getshortcutoruri.js
+++ b/browser/base/content/test/general/browser_getshortcutoruri.js
@@ -106,18 +106,18 @@ add_task(function* test_getshortcutoruri
     is(returnedData.url, expected, "got correct URL for " + data.keyword);
     is(getPostDataString(returnedData.postData), result.postData, "got correct postData for " + data.keyword);
     is(returnedData.mayInheritPrincipal, !result.isUnsafe, "got correct mayInheritPrincipal for " + data.keyword);
   }
 
   yield cleanupKeywords();
 });
 
-let folder = null;
-let gAddedEngines = [];
+var folder = null;
+var gAddedEngines = [];
 
 function* setupKeywords() {
   folder = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
                                                 type: PlacesUtils.bookmarks.TYPE_FOLDER,
                                                 title: "keyword-test" });
   for (let item of testData) {
     let data = item[0];
     if (data instanceof bmKeywordData) {
--- a/browser/base/content/test/general/browser_identity_UI.js
+++ b/browser/base/content/test/general/browser_identity_UI.js
@@ -54,21 +54,21 @@ var tests = [
   },
   {
     name: "IP address",
     location: "http://127.0.0.1:8888/",
     effectiveHost: "127.0.0.1"
   },
 ]
 
-let gCurrentTest, gCurrentTestIndex = -1, gTestDesc;
+var gCurrentTest, gCurrentTestIndex = -1, gTestDesc;
 // Go through the tests in both directions, to add additional coverage for
 // transitions between different states.
-let gForward = true;
-let gCheckETLD = false;
+var gForward = true;
+var gCheckETLD = false;
 function nextTest() {
   if (!gCheckETLD) {
     if (gForward)
       gCurrentTestIndex++;
     else
       gCurrentTestIndex--;
 
     if (gCurrentTestIndex == tests.length) {
--- a/browser/base/content/test/general/browser_lastAccessedTab.js
+++ b/browser/base/content/test/general/browser_lastAccessedTab.js
@@ -9,18 +9,18 @@ function isCurrent(tab, msg) {
   const DIFF = Math.abs(Date.now() - tab.lastAccessed);
   ok(DIFF <= CURRENT_TIME_TOLERANCE_MS, msg + " (difference: " + DIFF + ")");
 }
 
 function nextStep(fn) {
   setTimeout(fn, CURRENT_TIME_TOLERANCE_MS + 10);
 }
 
-let originalTab;
-let newTab;
+var originalTab;
+var newTab;
 
 function test() {
   waitForExplicitFinish();
 
   originalTab = gBrowser.selectedTab;
   nextStep(step2);
 }
 
--- a/browser/base/content/test/general/browser_mcb_redirect.js
+++ b/browser/base/content/test/general/browser_mcb_redirect.js
@@ -53,18 +53,18 @@
  *    - the image should not load
  */
 
 const PREF_ACTIVE = "security.mixed_content.block_active_content";
 const PREF_DISPLAY = "security.mixed_content.block_display_content";
 const gHttpsTestRoot = "https://example.com/browser/browser/base/content/test/general/";
 const gHttpTestRoot = "http://example.com/browser/browser/base/content/test/general/";
 
-let origBlockActive;
-let origBlockDisplay;
+var origBlockActive;
+var origBlockDisplay;
 var gTestBrowser = null;
 
 //------------------------ Helper Functions ---------------------
 
 registerCleanupFunction(function() {
   // Set preferences back to their original values
   Services.prefs.setBoolPref(PREF_ACTIVE, origBlockActive);
   Services.prefs.setBoolPref(PREF_DISPLAY, origBlockDisplay);
--- a/browser/base/content/test/general/browser_menuButtonBadgeManager.js
+++ b/browser/base/content/test/general/browser_menuButtonBadgeManager.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let menuButton = document.getElementById("PanelUI-menu-button");
+var menuButton = document.getElementById("PanelUI-menu-button");
 
 add_task(function* testButtonActivities() {
   is(menuButton.hasAttribute("badge-status"), false, "Should not have a badge status");
   is(menuButton.hasAttribute("badge"), false, "Should not have the badge attribute set");
 
   gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_FXA, "fxa-needs-authentication");
   is(menuButton.getAttribute("badge-status"), "fxa-needs-authentication", "Should have fxa-needs-authentication badge status");
 
--- a/browser/base/content/test/general/browser_mixedContentFramesOnHttp.js
+++ b/browser/base/content/test/general/browser_mixedContentFramesOnHttp.js
@@ -7,17 +7,17 @@
  * This test has a top level HTTP page with an HTTPS iframe.  The HTTPS iframe
  * includes an HTTP image.  We check that the top level security state is
  * STATE_IS_INSECURE.  The mixed content from the iframe shouldn't "upgrade"
  * the HTTP top level page to broken HTTPS.
  */
 
 const gHttpTestRoot = "http://example.com/browser/browser/base/content/test/general/";
 
-let gTestBrowser = null;
+var gTestBrowser = null;
 
 function SecStateTestsCompleted() {
   gBrowser.removeCurrentTab();
   window.focus();
   finish();
 }
 
 function test() {
--- a/browser/base/content/test/general/browser_mixedContentFromOnunload.js
+++ b/browser/base/content/test/general/browser_mixedContentFromOnunload.js
@@ -8,17 +8,17 @@
  */
 
 // We use different domains for each test and for navigation within each test
 const gHttpTestRoot1 = "http://example.com/browser/browser/base/content/test/general/";
 const gHttpsTestRoot1 = "https://test1.example.com/browser/browser/base/content/test/general/";
 const gHttpTestRoot2 = "http://example.net/browser/browser/base/content/test/general/";
 const gHttpsTestRoot2 = "https://test2.example.com/browser/browser/base/content/test/general/";
 
-let gTestBrowser = null;
+var gTestBrowser = null;
 
 function SecStateTestsCompleted() {
   gBrowser.removeCurrentTab();
   window.focus();
   finish();
 }
 
 function test() {
--- a/browser/base/content/test/general/browser_mixedcontent_securityflags.js
+++ b/browser/base/content/test/general/browser_mixedcontent_securityflags.js
@@ -8,17 +8,17 @@
 // * We change the about:config prefs (mixed active blocked, mixed display
 //   blocked), reload the page, and check the flags again.
 // * We override protection so all mixed content can load and check the
 //   flags again.
 
 const TEST_URI = "https://example.com/browser/browser/base/content/test/general/test-mixedcontent-securityerrors.html";
 const PREF_DISPLAY = "security.mixed_content.block_display_content";
 const PREF_ACTIVE = "security.mixed_content.block_active_content";
-let gTestBrowser = null;
+var gTestBrowser = null;
 waitForExplicitFinish();
 
 registerCleanupFunction(function() {
   // Set preferences back to their original values
   Services.prefs.clearUserPref(PREF_DISPLAY);
   Services.prefs.clearUserPref(PREF_ACTIVE);
   gBrowser.removeCurrentTab();
 });
--- a/browser/base/content/test/general/browser_notification_tab_switching.js
+++ b/browser/base/content/test/general/browser_notification_tab_switching.js
@@ -1,18 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 "use strict";
 
-let tab;
-let notification;
-let notificationURL = "http://example.org/browser/browser/base/content/test/general/file_dom_notifications.html";
-let newWindowOpenedFromTab;
+var tab;
+var notification;
+var notificationURL = "http://example.org/browser/browser/base/content/test/general/file_dom_notifications.html";
+var newWindowOpenedFromTab;
 
 function test () {
   waitForExplicitFinish();
 
   let pm = Services.perms;
   registerCleanupFunction(function() {
     pm.remove(makeURI(notificationURL), "desktop-notification");
     gBrowser.removeTab(tab);
--- a/browser/base/content/test/general/browser_parsable_css.js
+++ b/browser/base/content/test/general/browser_parsable_css.js
@@ -24,18 +24,18 @@ const kWhitelist = [
   // Loop standalone client CSS uses placeholder cross browser pseudo-element
   {sourceName: /loop\/.*\.css/i,
    errorMessage: /Unknown pseudo-class.*placeholder/i},
   // Highlighter CSS uses chrome-only pseudo-class, see bug 985597.
   {sourceName: /highlighter\.css/i,
    errorMessage: /Unknown pseudo-class.*moz-native-anonymous/i},
 ];
 
-let moduleLocation = gTestPath.replace(/\/[^\/]*$/i, "/parsingTestHelpers.jsm");
-let {generateURIsFromDirTree} = Cu.import(moduleLocation, {});
+var moduleLocation = gTestPath.replace(/\/[^\/]*$/i, "/parsingTestHelpers.jsm");
+var {generateURIsFromDirTree} = Cu.import(moduleLocation, {});
 
 /**
  * Check if an error should be ignored due to matching one of the whitelist
  * objects defined in kWhitelist
  *
  * @param aErrorObject the error to check
  * @return true if the error should be ignored, false otherwise.
  */
--- a/browser/base/content/test/general/browser_parsable_script.js
+++ b/browser/base/content/test/general/browser_parsable_script.js
@@ -6,18 +6,18 @@
  * matching files which have errors:
  */
 const kWhitelist = new Set([
   /defaults\/profile\/prefs.js$/,
   /browser\/content\/browser\/places\/controller.js$/,
 ]);
 
 
-let moduleLocation = gTestPath.replace(/\/[^\/]*$/i, "/parsingTestHelpers.jsm");
-let {generateURIsFromDirTree} = Cu.import(moduleLocation, {});
+var moduleLocation = gTestPath.replace(/\/[^\/]*$/i, "/parsingTestHelpers.jsm");
+var {generateURIsFromDirTree} = Cu.import(moduleLocation, {});
 
 // Normally we would use reflect.jsm to get Reflect.parse. However, if
 // we do that, then all the AST data is allocated in reflect.jsm's
 // zone. That exposes a bug in our GC. The GC collects reflect.jsm's
 // zone but not the zone in which our test code lives (since no new
 // data is being allocated in it). The cross-compartment wrappers in
 // our zone that point to the AST data never get collected, and so the
 // AST data itself is never collected. We need to GC both zones at
--- a/browser/base/content/test/general/browser_permissions.js
+++ b/browser/base/content/test/general/browser_permissions.js
@@ -1,15 +1,15 @@
 /*
  * Test the Permissions section in the Control Center.
  */
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 const PERMISSIONS_PAGE = "http://example.com/browser/browser/base/content/test/general/permissions.html";
-let {SitePermissions} = Cu.import("resource:///modules/SitePermissions.jsm", {});
+var {SitePermissions} = Cu.import("resource:///modules/SitePermissions.jsm", {});
 
 registerCleanupFunction(function() {
   SitePermissions.remove(gBrowser.currentURI, "install");
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
   }
 });
 
--- a/browser/base/content/test/general/browser_readerMode.js
+++ b/browser/base/content/test/general/browser_readerMode.js
@@ -7,17 +7,17 @@
  * reader-able content.
  */
 const TEST_PREFS = [
   ["reader.parse-on-load.enabled", true],
 ];
 
 const TEST_PATH = "http://example.com/browser/browser/base/content/test/general/";
 
-let readerButton = document.getElementById("reader-mode-button");
+var readerButton = document.getElementById("reader-mode-button");
 
 add_task(function* test_reader_button() {
   registerCleanupFunction(function() {
     // Reset test prefs.
     TEST_PREFS.forEach(([name, value]) => {
       Services.prefs.clearUserPref(name);
     });
     while (gBrowser.tabs.length > 1) {
--- a/browser/base/content/test/general/browser_readerMode_hidden_nodes.js
+++ b/browser/base/content/test/general/browser_readerMode_hidden_nodes.js
@@ -8,17 +8,17 @@
  */
 const TEST_PREFS = [
   ["reader.parse-on-load.enabled", true],
   ["browser.reader.detectedFirstArticle", false],
 ];
 
 const TEST_PATH = "http://example.com/browser/browser/base/content/test/general/";
 
-let readerButton = document.getElementById("reader-mode-button");
+var readerButton = document.getElementById("reader-mode-button");
 
 add_task(function* test_reader_button() {
   registerCleanupFunction(function() {
     // Reset test prefs.
     TEST_PREFS.forEach(([name, value]) => {
       Services.prefs.clearUserPref(name);
     });
     while (gBrowser.tabs.length > 1) {
--- a/browser/base/content/test/general/browser_remoteTroubleshoot.js
+++ b/browser/base/content/test/general/browser_remoteTroubleshoot.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let {WebChannel} = Cu.import("resource://gre/modules/WebChannel.jsm", {});
+var {WebChannel} = Cu.import("resource://gre/modules/WebChannel.jsm", {});
 
 const TEST_URL_TAIL = "example.com/browser/browser/base/content/test/general/test_remoteTroubleshoot.html"
 const TEST_URI_GOOD = Services.io.newURI("https://" + TEST_URL_TAIL, null, null);
 const TEST_URI_BAD = Services.io.newURI("http://" + TEST_URL_TAIL, null, null);
 
 // Creates a one-shot web-channel for the test data to be sent back from the test page.
 function promiseChannelResponse(channelID, originOrPermission) {
   return new Promise((resolve, reject) => {
--- a/browser/base/content/test/general/browser_removeUnsafeProtocolsFromURLBarPaste.js
+++ b/browser/base/content/test/general/browser_removeUnsafeProtocolsFromURLBarPaste.js
@@ -1,27 +1,27 @@
 function test() {
   waitForExplicitFinish();
   testNext();
 }
 
-let pairs = [
+var pairs = [
   ["javascript:", ""],
   ["javascript:1+1", "1+1"],
   ["javascript:document.domain", "document.domain"],
   ["data:text/html,<body>hi</body>", "data:text/html,<body>hi</body>"],
   // Nested things get confusing because some things don't parse as URIs:
   ["javascript:javascript:alert('hi!')", "alert('hi!')"],
   ["data:data:text/html,<body>hi</body>", "data:data:text/html,<body>hi</body>"],
   ["javascript:data:javascript:alert('hi!')", "data:javascript:alert('hi!')"],
   ["javascript:data:text/html,javascript:alert('hi!')", "data:text/html,javascript:alert('hi!')"],
   ["data:data:text/html,javascript:alert('hi!')", "data:data:text/html,javascript:alert('hi!')"],
 ];
 
-let clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
+var clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
 
 function paste(input, cb) {
   waitForClipboard(input, function() {
     clipboardHelper.copyString(input);
   }, function() {
     document.commandDispatcher.getControllerForCommand("cmd_paste").doCommand("cmd_paste");
     cb();
   }, function() {
--- a/browser/base/content/test/general/browser_restore_isAppTab.js
+++ b/browser/base/content/test/general/browser_restore_isAppTab.js
@@ -8,17 +8,17 @@ const DUMMY = "http://example.com/browse
 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.
-let CrashObserver = {
+var CrashObserver = {
   observe: function(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...");
@@ -77,17 +77,17 @@ function isBrowserAppTab(browser) {
     executeSoon(function () {
       browser.messageManager.addMessageListener("Test:IsAppTab", listener);
       browser.messageManager.sendAsyncMessage("Test:GetIsAppTab");
     });
   });
 }
 
 // Restarts the child process by crashing it then reloading the tab
-let restart = Task.async(function*(browser) {
+var restart = Task.async(function*(browser) {
   // If the tab isn't remote this would crash the main process so skip it
   if (!browser.isRemoteBrowser)
     return browser;
 
   // Make sure the main process has all of the current tab state before crashing
   yield TabStateFlusher.flush(browser);
 
   browser.messageManager.sendAsyncMessage("Test:Crash");
--- a/browser/base/content/test/general/browser_sanitize-passwordDisabledHosts.js
+++ b/browser/base/content/test/general/browser_sanitize-passwordDisabledHosts.js
@@ -1,15 +1,15 @@
 // Bug 474792 - Clear "Never remember passwords for this site" when
 // clearing site-specific settings in Clear Recent History dialog
 
-let tempScope = {};
+var tempScope = {};
 Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
                                            .loadSubScript("chrome://browser/content/sanitize.js", tempScope);
-let Sanitizer = tempScope.Sanitizer;
+var Sanitizer = tempScope.Sanitizer;
 
 function test() {
 
   var pwmgr = Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
 
   // Add a disabled host
   pwmgr.setLoginSavingEnabled("http://example.com", false);
   
--- a/browser/base/content/test/general/browser_sanitize-sitepermissions.js
+++ b/browser/base/content/test/general/browser_sanitize-sitepermissions.js
@@ -1,14 +1,14 @@
 // Bug 380852 - Delete permission manager entries in Clear Recent History
 
-let tempScope = {};
+var tempScope = {};
 Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
                                            .loadSubScript("chrome://browser/content/sanitize.js", tempScope);
-let Sanitizer = tempScope.Sanitizer;
+var Sanitizer = tempScope.Sanitizer;
 
 function countPermissions() {
   let result = 0;
   let enumerator = Services.perms.enumerator;
   while (enumerator.hasMoreElements()) {
     result++;
     enumerator.getNext();
   }
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -1,25 +1,25 @@
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
 // Bug 453440 - Test the timespan-based logic of the sanitizer code
-let now_mSec = Date.now();
-let now_uSec = now_mSec * 1000;
+var now_mSec = Date.now();
+var now_uSec = now_mSec * 1000;
 
 const kMsecPerMin = 60 * 1000;
 const kUsecPerMin = 60 * 1000000;
 
-let tempScope = {};
+var tempScope = {};
 Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
                                            .loadSubScript("chrome://browser/content/sanitize.js", tempScope);
-let Sanitizer = tempScope.Sanitizer;
+var Sanitizer = tempScope.Sanitizer;
 
-let FormHistory = (Components.utils.import("resource://gre/modules/FormHistory.jsm", {})).FormHistory;
-let Downloads = (Components.utils.import("resource://gre/modules/Downloads.jsm", {})).Downloads;
+var FormHistory = (Components.utils.import("resource://gre/modules/FormHistory.jsm", {})).FormHistory;
+var Downloads = (Components.utils.import("resource://gre/modules/Downloads.jsm", {})).Downloads;
 
 function promiseFormHistoryRemoved() {
   let deferred = Promise.defer();
   Services.obs.addObserver(function onfh() {
     Services.obs.removeObserver(onfh, "satchel-storage-changed", false);
     deferred.resolve();
   }, "satchel-storage-changed", false);
   return deferred.promise;
--- a/browser/base/content/test/general/browser_sanitizeDialog.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog.js
@@ -13,32 +13,32 @@
  * test checks the UI of the dialog and makes sure it's correctly connected to
  * the sanitize timespan code.
  *
  * Some of this code, especially the history creation parts, was taken from
  * browser/base/content/test/general/browser_sanitize-timespans.js.
  */
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
+var {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
 
 XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
                                   "resource://gre/modules/FormHistory.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Downloads",
                                   "resource://gre/modules/Downloads.jsm");
 
-let tempScope = {};
+var tempScope = {};
 Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
                                            .loadSubScript("chrome://browser/content/sanitize.js", tempScope);
-let Sanitizer = tempScope.Sanitizer;
+var Sanitizer = tempScope.Sanitizer;
 
 const kMsecPerMin = 60 * 1000;
 const kUsecPerMin = 60 * 1000000;
 
-let formEntries, downloadIDs, olderDownloadIDs;
+var formEntries, downloadIDs, olderDownloadIDs;
 
 // Add tests here.  Each is a function that's called by doNextTest().
 var gAllTests = [
 
   /**
    * Initializes the dialog to its default state.
    */
   function () {
@@ -656,18 +656,18 @@ var gAllTests = [
     wh.open();
   }
 ];
 
 // Index in gAllTests of the test currently being run.  Incremented for each
 // test run.  See doNextTest().
 var gCurrTest = 0;
 
-let now_mSec = Date.now();
-let now_uSec = now_mSec * 1000;
+var now_mSec = Date.now();
+var now_uSec = now_mSec * 1000;
 
 ///////////////////////////////////////////////////////////////////////////////
 
 /**
  * This wraps the dialog and provides some convenience methods for interacting
  * with it.
  *
  * @param aWin
--- a/browser/base/content/test/general/browser_save_link_when_window_navigates.js
+++ b/browser/base/content/test/general/browser_save_link_when_window_navigates.js
@@ -84,17 +84,17 @@ function triggerSave(aWindow, aCallback)
     ok(downloadSuccess, "Link should have been downloaded successfully");
     aWindow.close();
 
     executeSoon(aCallback);
   }
 }
 
 
-let windowObserver = {
+var windowObserver = {
   setCallback: function(aCallback) {
     if (this._callback) {
       ok(false, "Should only be dealing with one callback at a time.");
     }
     this._callback = aCallback;
   },
   observe: function(aSubject, aTopic, aData) {
     if (aTopic != "domwindowopened") {
--- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
@@ -1,13 +1,13 @@
 /* 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/. */
 
-let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", null);
+var {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", null);
 
 function test() {
   // initialization
   waitForExplicitFinish();
   let windowsToClose = [];
   let testURI = "http://mochi.test:8888/browser/browser/base/content/test/general/bug792517.html";
   let fileName;
   let MockFilePicker = SpecialPowers.MockFilePicker;
--- a/browser/base/content/test/general/browser_search_favicon.js
+++ b/browser/base/content/test/general/browser_search_favicon.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let gOriginalEngine;
-let gEngine;
-let gUnifiedCompletePref = "browser.urlbar.unifiedcomplete";
-let gRestyleSearchesPref = "browser.urlbar.restyleSearches";
+var gOriginalEngine;
+var gEngine;
+var gUnifiedCompletePref = "browser.urlbar.unifiedcomplete";
+var gRestyleSearchesPref = "browser.urlbar.restyleSearches";
 
 registerCleanupFunction(() => {
   Services.prefs.clearUserPref(gUnifiedCompletePref);
   Services.prefs.clearUserPref(gRestyleSearchesPref);
   Services.search.currentEngine = gOriginalEngine;
   Services.search.removeEngine(gEngine);
   return PlacesTestUtils.clearHistory();
 });
--- a/browser/base/content/test/general/browser_ssl_error_reports.js
+++ b/browser/base/content/test/general/browser_ssl_error_reports.js
@@ -1,17 +1,17 @@
 "use strict";
 
-let badChainURL = "https://badchain.include-subdomains.pinning.example.com";
-let noCertURL = "https://fail-handshake.example.com";
-let enabledPref = false;
-let automaticPref = false;
-let urlPref = "security.ssl.errorReporting.url";
-let enforcement_level = 1;
-let ROOT = getRootDirectory(gTestPath);
+var badChainURL = "https://badchain.include-subdomains.pinning.example.com";
+var noCertURL = "https://fail-handshake.example.com";
+var enabledPref = false;
+var automaticPref = false;
+var urlPref = "security.ssl.errorReporting.url";
+var enforcement_level = 1;
+var ROOT = getRootDirectory(gTestPath);
 
 SimpleTest.requestCompleteLog();
 
 add_task(function* test_send_report_manual_badchain() {
   yield testSendReportManual(badChainURL, "succeed");
 });
 
 add_task(function* test_send_report_manual_nocert() {
@@ -94,17 +94,17 @@ add_task(function* test_set_automatic() 
 
   yield prefDisabled;
 
   gBrowser.removeTab(tab);
   cleanup();
 });
 
 // test that manual report sending (with button clicks) works
-let testSendReportManual = function*(testURL, suffix) {
+var testSendReportManual = function*(testURL, suffix) {
   setup();
   Services.prefs.setBoolPref("security.ssl.errorReporting.enabled", true);
   Services.prefs.setCharPref("security.ssl.errorReporting.url",
     "https://example.com/browser/browser/base/content/test/general/pinning_reports.sjs?" + suffix);
 
   let tab = gBrowser.addTab(testURL, {skipAnimation: true});
   let browser = tab.linkedBrowser;
   let mm = browser.messageManager;
--- a/browser/base/content/test/general/browser_star_hsts.js
+++ b/browser/base/content/test/general/browser_star_hsts.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-let secureURL = "https://example.com/browser/browser/base/content/test/general/browser_star_hsts.sjs";
-let unsecureURL = "http://example.com/browser/browser/base/content/test/general/browser_star_hsts.sjs";
+var secureURL = "https://example.com/browser/browser/base/content/test/general/browser_star_hsts.sjs";
+var unsecureURL = "http://example.com/browser/browser/base/content/test/general/browser_star_hsts.sjs";
 
 add_task(function* test_star_redirect() {
   registerCleanupFunction(function() {
     // Ensure to remove example.com from the HSTS list.
     let sss = Cc["@mozilla.org/ssservice;1"]
                 .getService(Ci.nsISiteSecurityService);
     sss.removeState(Ci.nsISiteSecurityService.HEADER_HSTS,
                     NetUtil.newURI("http://example.com/"), 0);
--- a/browser/base/content/test/general/browser_syncui.js
+++ b/browser/base/content/test/general/browser_syncui.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let {Log} = Cu.import("resource://gre/modules/Log.jsm", {});
-let {Weave} = Cu.import("resource://services-sync/main.js", {});
-let {Notifications} = Cu.import("resource://services-sync/notifications.js", {});
+var {Log} = Cu.import("resource://gre/modules/Log.jsm", {});
+var {Weave} = Cu.import("resource://services-sync/main.js", {});
+var {Notifications} = Cu.import("resource://services-sync/notifications.js", {});
 
-let stringBundle = Cc["@mozilla.org/intl/stringbundle;1"]
+var stringBundle = Cc["@mozilla.org/intl/stringbundle;1"]
                    .getService(Ci.nsIStringBundleService)
                    .createBundle("chrome://weave/locale/services/sync.properties");
 
 // ensure test output sees log messages.
 Log.repository.getLogger("browserwindow.syncui").addAppender(new Log.DumpAppender());
 
 // Sync manages 3 broadcasters so the menus correctly reflect the Sync state.
 // Only one of these 3 should ever be visible - pass the ID of the broadcaster
--- a/browser/base/content/test/general/browser_tab_drag_drop_perwindow.js
+++ b/browser/base/content/test/general/browser_tab_drag_drop_perwindow.js
@@ -1,14 +1,14 @@
 /* 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/. */
 
 const CHROMEUTILS_URL = "chrome://mochikit/content/tests/SimpleTest/ChromeUtils.js";
-let ChromeUtils = {};
+var ChromeUtils = {};
 
 Services.scriptloader.loadSubScript(CHROMEUTILS_URL, ChromeUtils);
 
 /**
  * Tests that tabs from Private Browsing windows cannot be dragged
  * into non-private windows, and vice-versa.
  */
 add_task(function* test_dragging_private_windows() {
--- a/browser/base/content/test/general/browser_tab_dragdrop.js
+++ b/browser/base/content/test/general/browser_tab_dragdrop.js
@@ -1,19 +1,19 @@
 function swapTabsAndCloseOther(a, b) {
   gBrowser.swapBrowsersAndCloseOther(gBrowser.tabs[b], gBrowser.tabs[a]);
 }
 
-let getClicks = function(tab) {
+var getClicks = function(tab) {
   return ContentTask.spawn(tab.linkedBrowser, {}, function() {
     return content.wrappedJSObject.clicks;
   });
 }
 
-let clickTest = Task.async(function*(tab) {
+var clickTest = Task.async(function*(tab) {
   let clicks = yield getClicks(tab);
 
   yield ContentTask.spawn(tab.linkedBrowser, {}, function() {
     let target = content.document.body;
     let rect = target.getBoundingClientRect();
     let left = (rect.left + rect.right) / 2;
     let top = (rect.top + rect.bottom) / 2;
 
--- a/browser/base/content/test/general/browser_tabfocus.js
+++ b/browser/base/content/test/general/browser_tabfocus.js
@@ -1,31 +1,31 @@
 /*
  * This test checks that focus is adjusted properly when switching tabs.
  */
 
-let testPage1 = "<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
-let testPage2 = "<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
-let testPage3 = "<html id='html3'><body id='body3'><button id='button3'>Tab 3</button></body></html>";
+var testPage1 = "<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
+var testPage2 = "<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
+var testPage3 = "<html id='html3'><body id='body3'><button id='button3'>Tab 3</button></body></html>";
 
 const fm = Services.focus;
 
-let tab1 = null;
-let tab2 = null;
-let browser1 = null;
-let browser2 = null;
-let _browser_tabfocus_test_lastfocus;
-let _browser_tabfocus_test_lastfocuswindow = null;
-let actualEvents = [];
-let expectedEvents = [];
-let currentTestName = "";
-let _expectedElement = null;
-let _expectedWindow = null;
+var tab1 = null;
+var tab2 = null;
+var browser1 = null;
+var browser2 = null;
+var _browser_tabfocus_test_lastfocus;
+var _browser_tabfocus_test_lastfocuswindow = null;
+var actualEvents = [];
+var expectedEvents = [];
+var currentTestName = "";
+var _expectedElement = null;
+var _expectedWindow = null;
 
-let currentPromiseResolver = null;
+var currentPromiseResolver = null;
 
 function* getFocusedElementForBrowser(browser, dontCheckExtraFocus = false)
 {
   if (gMultiProcessBrowser) {
     return new Promise((resolve, reject) => {
       messageManager.addMessageListener("Browser:GetCurrentFocus", function getCurrentFocus(message) {
         messageManager.removeMessageListener("Browser:GetCurrentFocus", getCurrentFocus);
         resolve(message.data.details);
--- a/browser/base/content/test/general/browser_tabopen_reflows.js
+++ b/browser/base/content/test/general/browser_tabopen_reflows.js
@@ -119,17 +119,17 @@ add_task(function*() {
   // Wait until the tabopen animation has finished.
   yield waitForTransitionEnd();
 
   // Remove reflow observer and clean up.
   docShell.removeWeakReflowObserver(observer);
   gBrowser.removeCurrentTab();
 });
 
-let observer = {
+var observer = {
   reflow: function (start, end) {
     // Gather information about the current code path.
     let path = (new Error().stack).split("\n").slice(1).map(line => {
       return line.replace(/:\d+:\d+$/, "");
     }).join("|");
     let pathWithLineNumbers = (new Error().stack).split("\n").slice(1).join("|");
 
     // Stack trace is empty. Reflow was triggered by native code.
--- a/browser/base/content/test/general/browser_trackingUI_1.js
+++ b/browser/base/content/test/general/browser_trackingUI_1.js
@@ -7,20 +7,20 @@
  * See also Bugs 1175327, 1043801, 1178985
  */
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 const PREF = "privacy.trackingprotection.enabled";
 const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
 const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
 const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";
-let TrackingProtection = null;
-let tabbrowser = null;
+var TrackingProtection = null;
+var tabbrowser = null;
 
-let {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
+var {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
 
 registerCleanupFunction(function() {
   TrackingProtection = tabbrowser = null;
   UrlClassifierTestUtils.cleanupTestTrackers();
   Services.prefs.clearUserPref(PREF);
   Services.prefs.clearUserPref(PB_PREF);
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
--- a/browser/base/content/test/general/browser_trackingUI_2.js
+++ b/browser/base/content/test/general/browser_trackingUI_2.js
@@ -4,20 +4,20 @@
  * See also Bugs 1175327, 1043801, 1178985.
  */
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 const PREF = "privacy.trackingprotection.enabled";
 const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
 const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
 const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";
-let TrackingProtection = null;
-let tabbrowser = null;
+var TrackingProtection = null;
+var tabbrowser = null;
 
-let {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
+var {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
 
 registerCleanupFunction(function() {
   TrackingProtection = tabbrowser = null;
   UrlClassifierTestUtils.cleanupTestTrackers();
   Services.prefs.clearUserPref(PREF);
   Services.prefs.clearUserPref(PB_PREF);
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
--- a/browser/base/content/test/general/browser_trackingUI_4.js
+++ b/browser/base/content/test/general/browser_trackingUI_4.js
@@ -4,20 +4,20 @@
  * See also Bug 1175858.
  */
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 const PREF = "privacy.trackingprotection.enabled";
 const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
 const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
 const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";
-let TrackingProtection = null;
-let tabbrowser = null;
+var TrackingProtection = null;
+var tabbrowser = null;
 
-let {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
+var {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
 
 registerCleanupFunction(function() {
   TrackingProtection = tabbrowser = null;
   UrlClassifierTestUtils.cleanupTestTrackers();
   Services.prefs.clearUserPref(PREF);
   Services.prefs.clearUserPref(PB_PREF);
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
--- a/browser/base/content/test/general/browser_trackingUI_5.js
+++ b/browser/base/content/test/general/browser_trackingUI_5.js
@@ -1,19 +1,19 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Test that sites added to the Tracking Protection whitelist in private
 // browsing mode don't persist once the private browsing window closes.
 
 const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
 const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";
-let TrackingProtection = null;
-let browser = null;
-let {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
+var TrackingProtection = null;
+var browser = null;
+var {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
 
 registerCleanupFunction(function() {
   TrackingProtection = browser = null;
   UrlClassifierTestUtils.cleanupTestTrackers();
 });
 
 function hidden(sel) {
   let win = browser.ownerGlobal;
--- a/browser/base/content/test/general/browser_trackingUI_telemetry.js
+++ b/browser/base/content/test/general/browser_trackingUI_telemetry.js
@@ -6,17 +6,17 @@ const {classes: Cc, interfaces: Ci, util
 const PREF = "privacy.trackingprotection.enabled";
 const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
 const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";
 const {UrlClassifierTestUtils} = Cu.import("resource://testing-common/UrlClassifierTestUtils.jsm", {});
 
 /**
  * Enable local telemetry recording for the duration of the tests.
  */
-let oldCanRecord = Services.telemetry.canRecordExtended;
+var oldCanRecord = Services.telemetry.canRecordExtended;
 Services.telemetry.canRecordExtended = true;
 Services.prefs.setBoolPref(PREF, false);
 Services.telemetry.getHistogramById("TRACKING_PROTECTION_ENABLED").clear();
 registerCleanupFunction(function () {
   UrlClassifierTestUtils.cleanupTestTrackers();
   Services.telemetry.canRecordExtended = oldCanRecord;
   Services.prefs.clearUserPref(PREF);
 });
--- a/browser/base/content/test/general/browser_urlbarAutoFillTrimURLs.js
+++ b/browser/base/content/test/general/browser_urlbarAutoFillTrimURLs.js
@@ -62,17 +62,17 @@ function continue_test() {
         is(gURLBar.textValue, "www.autofilltrimurl.com/whatever", "trim was applied correctly");
         gURLBar.closePopup();
         PlacesTestUtils.clearHistory().then(finish);
       });
     });
   });
 }
 
-let gOnSearchComplete = null;
+var gOnSearchComplete = null;
 function waitForSearchComplete(aCallback) {
   info("Waiting for onSearchComplete");
   if (!gOnSearchComplete) {
     gOnSearchComplete = gURLBar.onSearchComplete;
     registerCleanupFunction(() => {
       gURLBar.onSearchComplete = gOnSearchComplete;
     });
   }
--- a/browser/base/content/test/general/browser_urlbarRevert.js
+++ b/browser/base/content/test/general/browser_urlbarRevert.js
@@ -1,9 +1,9 @@
-let tab = null;
+var tab = null;
 
 function test() {
   waitForExplicitFinish();
 
   let pageLoaded = {
     onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
           aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
--- a/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js
+++ b/browser/base/content/test/general/browser_urlbarSearchSingleWordNotification.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-let notificationObserver;
+var notificationObserver;
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("browser.fixup.domainwhitelist.localhost");
   if (notificationObserver) {
     notificationObserver.disconnect();
   }
 });
 
 function promiseNotificationForTab(aBrowser, value, expected, tab=aBrowser.selectedTab) {
--- a/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js
+++ b/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js
@@ -9,17 +9,17 @@ function wait_while_tab_is_busy() {
       }
     };
     gBrowser.addProgressListener(progressListener);
   });
 }
 
 // This function waits for the tab to stop being busy instead of waiting for it
 // to load, since the canViewSource change happens at that time.
-let with_new_tab_opened = Task.async(function* (options, taskFn) {
+var with_new_tab_opened = Task.async(function* (options, taskFn) {
   let busyPromise = wait_while_tab_is_busy();
   let tab = yield BrowserTestUtils.openNewForegroundTab(options.gBrowser, options.url, false);
   yield busyPromise;
   yield taskFn(tab.linkedBrowser);
   gBrowser.removeTab(tab);
 });
 
 add_task(function*() {
--- a/browser/base/content/test/general/browser_web_channel.js
+++ b/browser/base/content/test/general/browser_web_channel.js
@@ -9,17 +9,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/WebChannel.jsm");
 
 const HTTP_PATH = "http://example.com";
 const HTTP_ENDPOINT = "/browser/browser/base/content/test/general/browser_web_channel.html";
 
 // Keep this synced with /mobile/android/tests/browser/robocop/testWebChannel.js
 // as much as possible.  (We only have that since we can't run browser chrome
 // tests on Android.  Yet?)
-let gTests = [
+var gTests = [
   {
     desc: "WebChannel generic message",
     run: function* () {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH, null, null));
         channel.listen(function (id, message, target) {
           is(id, "generic");
--- a/browser/base/content/test/general/browser_windowactivation.js
+++ b/browser/base/content/test/general/browser_windowactivation.js
@@ -1,18 +1,18 @@
 /*
  * This test checks that window activation state is set properly with multiple tabs.
  */
 
-let testPage = "data:text/html,<body><style>:-moz-window-inactive { background-color: red; }</style><div id='area'></div></body>";
+var testPage = "data:text/html,<body><style>:-moz-window-inactive { background-color: red; }</style><div id='area'></div></body>";
 
-let colorChangeNotifications = 0;
-let otherWindow;
+var colorChangeNotifications = 0;
+var otherWindow;
 
-let browser1, browser2;
+var browser1, browser2;
 
 function test() {
   waitForExplicitFinish();
   waitForFocus(reallyRunTests);
 }
 
 function reallyRunTests() {
 
--- a/browser/base/content/test/general/browser_windowopen_reflows.js
+++ b/browser/base/content/test/general/browser_windowopen_reflows.js
@@ -67,17 +67,17 @@ function test() {
     // Remove reflow observer and clean up.
     docShell.removeWeakReflowObserver(observer);
     win.close();
 
     finish();
   });
 }
 
-let observer = {
+var observer = {
   reflow: function (start, end) {
     // Gather information about the current code path.
     let stack = new Error().stack;
     let path = stack.split("\n").slice(1).map(line => {
       return line.replace(/:\d+:\d+$/, "");
     }).join("|");
     let pathWithLineNumbers = (new Error().stack).split("\n").slice(1).join("|");
 
--- a/browser/base/content/test/general/browser_zbug569342.js
+++ b/browser/base/content/test/general/browser_zbug569342.js
@@ -24,17 +24,17 @@ function test() {
 
   // Open the Find bar before we navigate to pages that shouldn't have it.
   EventUtils.synthesizeKey("f", { accelKey: true });
   ok(!gFindBar.hidden, "Find bar should be visible");
 
   nextTest();
 }
 
-let urls = [
+var urls = [
   "about:config",
   "about:addons",
   "about:permissions"
 ];
 
 function nextTest() {
   let url = urls.shift();
   if (url) {
--- a/browser/base/content/test/general/contentSearchUI.js
+++ b/browser/base/content/test/general/contentSearchUI.js
@@ -8,17 +8,17 @@
 const TEST_MSG = "ContentSearchUIControllerTest";
 const ENGINE_NAME = "browser_searchSuggestionEngine searchSuggestionEngine.xml";
 var gController;
 
 addMessageListener(TEST_MSG, msg => {
   messageHandlers[msg.data.type](msg.data.data);
 });
 
-let messageHandlers = {
+var messageHandlers = {
 
   init: function() {
     Services.search.currentEngine = Services.search.getEngineByName(ENGINE_NAME);
     let input = content.document.querySelector("input");
     gController =
       new content.ContentSearchUIController(input, input.parentNode, "test", "test");
     content.addEventListener("ContentSearchService", function listener(aEvent) {
       if (aEvent.detail.type == "State" &&
--- a/browser/base/content/test/general/domplate_test.js
+++ b/browser/base/content/test/general/domplate_test.js
@@ -1,17 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
-let doc;
-let div;
-let plate;
+var doc;
+var div;
+var plate;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource:///modules/domplate.jsm");
 
 function createDocument()
 {
   doc.body.innerHTML = '<div id="first">no</div>';
   doc.title = "Domplate Test";
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -479,17 +479,17 @@ function waitForDocLoadComplete(aBrowser
   });
 }
 
 // Keep a set of progress listeners for waitForDocLoadComplete() to make sure
 // they're not GC'ed before we saw the page load.
 waitForDocLoadComplete.listeners = new Set();
 registerCleanupFunction(() => waitForDocLoadComplete.listeners.clear());
 
-let FullZoomHelper = {
+var FullZoomHelper = {
 
   selectTabAndWaitForLocationChange: function selectTabAndWaitForLocationChange(tab) {
     if (!tab)
       throw new Error("tab must be given.");
     if (gBrowser.selectedTab == tab)
       return Promise.resolve();
 
     return Promise.all([BrowserTestUtils.switchTab(gBrowser, tab),
--- a/browser/base/content/test/newtab/browser_newtab_bug722273.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug722273.js
@@ -1,20 +1,20 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const NOW = Date.now() * 1000;
 const URL = "http://fake-site.com/";
 
-let tmp = {};
+var tmp = {};
 Cc["@mozilla.org/moz/jssubscript-loader;1"]
   .getService(Ci.mozIJSSubScriptLoader)
   .loadSubScript("chrome://browser/content/sanitize.js", tmp);
 
-let {Sanitizer} = tmp;
+var {Sanitizer} = tmp;
 
 function runTests() {
   sanitizeHistory();
   yield addFakeVisits();
   yield addNewTabPageTab();
 
   is(getCell(0).site.url, URL, "first site is our fake site");
 
--- a/browser/base/content/test/newtab/browser_newtab_enhanced.js
+++ b/browser/base/content/test/newtab/browser_newtab_enhanced.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const PRELOAD_PREF = "browser.newtab.preload";
 
-let suggestedLink = {
+var suggestedLink = {
   url: "http://example1.com/2",
   imageURI: "data:image/png;base64,helloWORLD3",
   title: "title2",
   type: "affiliate",
   adgroup_name: "Technology",
   frecent_sites: ["classroom.google.com", "codeacademy.org", "codecademy.com", "codeschool.com", "codeyear.com", "elearning.ut.ac.id", "how-to-build-websites.com", "htmlcodetutorial.com", "htmldog.com", "htmlplayground.com", "learn.jquery.com", "quackit.com", "roseindia.net", "teamtreehouse.com", "tizag.com", "tutorialspoint.com", "udacity.com", "w3schools.com", "webdevelopersnotes.com"]
 };
 
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -61,17 +61,17 @@ var gExpectedSearchEventQueue = [];
 
 var gNewEngines = [];
 
 function runTests() {
   runTaskifiedTests().then(TestRunner.next, TestRunner.next);
   yield;
 }
 
-let runTaskifiedTests = Task.async(function* () {
+var runTaskifiedTests = Task.async(function* () {
   let oldCurrentEngine = Services.search.currentEngine;
 
   yield addNewTabPageTabPromise();
 
   // The tab is removed at the end of the test, so there's no need to remove
   // this listener at the end of the test.
   info("Adding search event listener");
   getContentWindow().addEventListener(SERVICE_EVENT_NAME, searchEventListener);
@@ -277,17 +277,17 @@ function blobToBase64(blob) {
     reader.onload = function() {
       resolve(reader.result);
     }
     reader.onerror = reject;
     reader.readAsDataURL(blob);
   });
 }
 
-let checkCurrentEngine = Task.async(function* ({name: basename, logoPrefix1x, logoPrefix2x}) {
+var checkCurrentEngine = Task.async(function* ({name: basename, logoPrefix1x, logoPrefix2x}) {
   let engine = Services.search.currentEngine;
   ok(engine.name.includes(basename),
      "Sanity check: current engine: engine.name=" + engine.name +
      " basename=" + basename);
 
   // gSearch.currentEngineName
   is(gSearch().defaultEngine.name, engine.name,
      "currentEngineName: " + engine.name);
--- a/browser/base/content/test/newtab/head.js
+++ b/browser/base/content/test/newtab/head.js
@@ -1,64 +1,64 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const PREF_NEWTAB_ENABLED = "browser.newtabpage.enabled";
 const PREF_NEWTAB_DIRECTORYSOURCE = "browser.newtabpage.directory.source";
 
 Services.prefs.setBoolPref(PREF_NEWTAB_ENABLED, true);
 
-let tmp = {};
+var tmp = {};
 Cu.import("resource://gre/modules/Promise.jsm", tmp);
 Cu.import("resource://gre/modules/NewTabUtils.jsm", tmp);
 Cu.import("resource:///modules/DirectoryLinksProvider.jsm", tmp);
 Cu.import("resource://testing-common/PlacesTestUtils.jsm", tmp);
 Cc["@mozilla.org/moz/jssubscript-loader;1"]
   .getService(Ci.mozIJSSubScriptLoader)
   .loadSubScript("chrome://browser/content/sanitize.js", tmp);
 Cu.import("resource://gre/modules/Timer.jsm", tmp);
-let {Promise, NewTabUtils, Sanitizer, clearTimeout, setTimeout, DirectoryLinksProvider, PlacesTestUtils} = tmp;
+var {Promise, NewTabUtils, Sanitizer, clearTimeout, setTimeout, DirectoryLinksProvider, PlacesTestUtils} = tmp;
 
-let uri = Services.io.newURI("about:newtab", null, null);
-let principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
+var uri = Services.io.newURI("about:newtab", null, null);
+var principal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
 
-let isMac = ("nsILocalFileMac" in Ci);
-let isLinux = ("@mozilla.org/gnome-gconf-service;1" in Cc);
-let isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
-let gWindow = window;
+var isMac = ("nsILocalFileMac" in Ci);
+var isLinux = ("@mozilla.org/gnome-gconf-service;1" in Cc);
+var isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
+var gWindow = window;
 
 // Default to dummy/empty directory links
-let gDirectorySource = 'data:application/json,{"test":1}';
-let gOrigDirectorySource;
+var gDirectorySource = 'data:application/json,{"test":1}';
+var gOrigDirectorySource;
 
 // The tests assume all 3 rows and all 3 columns of sites are shown, but the
 // window may be too small to actually show everything.  Resize it if necessary.
-let requiredSize = {};
+var requiredSize = {};
 requiredSize.innerHeight =
   40 + 32 + // undo container + bottom margin
   44 + 32 + // search bar + bottom margin
   (3 * (180 + 32)) + // 3 rows * (tile height + title and bottom margin)
   100; // breathing room
 requiredSize.innerWidth =
   (3 * (290 + 20)) + // 3 cols * (tile width + side margins)
   100; // breathing room
 
-let oldSize = {};
+var oldSize = {};
 Object.keys(requiredSize).forEach(prop => {
   info([prop, gBrowser.contentWindow[prop], requiredSize[prop]]);
   if (gBrowser.contentWindow[prop] < requiredSize[prop]) {
     oldSize[prop] = gBrowser.contentWindow[prop];
     info("Changing browser " + prop + " from " + oldSize[prop] + " to " +
          requiredSize[prop]);
     gBrowser.contentWindow[prop] = requiredSize[prop];
   }
 });
 
-let screenHeight = {};
-let screenWidth = {};
+var screenHeight = {};
+var screenWidth = {};
 Cc["@mozilla.org/gfx/screenmanager;1"].
   getService(Ci.nsIScreenManager).
   primaryScreen.
   GetAvailRectDisplayPix({}, {}, screenWidth, screenHeight);
 screenHeight = screenHeight.value;
 screenWidth = screenWidth.value;
 
 if (screenHeight < gBrowser.contentWindow.outerHeight) {
@@ -128,17 +128,17 @@ function test() {
   // Save the original directory source (which is set globally for tests)
   gOrigDirectorySource = Services.prefs.getCharPref(PREF_NEWTAB_DIRECTORYSOURCE);
   Services.prefs.setCharPref(PREF_NEWTAB_DIRECTORYSOURCE, gDirectorySource);
 }
 
 /**
  * The test runner that controls the execution flow of our tests.
  */
-let TestRunner = {
+var TestRunner = {
   /**
    * Starts the test runner.
    */
   run: function () {
     this._iter = runTests();
     this.next();
   },
 
--- a/browser/base/content/test/plugins/blocklist_proxy.js
+++ b/browser/base/content/test/plugins/blocklist_proxy.js
@@ -7,17 +7,17 @@ const kBlocklistServiceUUID = "{66354bc9
 const kBlocklistServiceContractID = "@mozilla.org/extensions/blocklist;1";
 const kBlocklistServiceFactory = Cm.getClassObject(Cc[kBlocklistServiceContractID], Ci.nsIFactory);
 
 Cu.import('resource://gre/modules/XPCOMUtils.jsm');
 
 /*
  * A lightweight blocklist proxy for the testing purposes.
  */
-let BlocklistProxy = {
+var BlocklistProxy = {
   _uuid: null,
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsIBlocklistService,
                                          Ci.nsITimerCallback]),
 
   init: function() {
     if (!this._uuid) {
--- a/browser/base/content/test/plugins/browser_CTP_context_menu.js
+++ b/browser/base/content/test/plugins/browser_CTP_context_menu.js
@@ -1,9 +1,9 @@
-let rootDir = getRootDirectory(gTestPath);
+var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 
 add_task(function* () {
   registerCleanupFunction(function () {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
--- a/browser/base/content/test/plugins/browser_CTP_crashreporting.js
+++ b/browser/base/content/test/plugins/browser_CTP_crashreporting.js
@@ -1,9 +1,9 @@
-let rootDir = getRootDirectory(gTestPath);
+var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 const SERVER_URL = "http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs";
 const PLUGIN_PAGE = gTestRoot + "plugin_big.html";
 const PLUGIN_SMALL_PAGE = gTestRoot + "plugin_small.html";
 
 /**
  * Takes an nsIPropertyBag and converts it into a JavaScript Object. It
  * will also convert any nsIPropertyBag's within the nsIPropertyBag
--- a/browser/base/content/test/plugins/browser_CTP_data_urls.js
+++ b/browser/base/content/test/plugins/browser_CTP_data_urls.js
@@ -1,12 +1,12 @@
-let rootDir = getRootDirectory(gTestPath);
+var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
-let gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
-let gTestBrowser = null;
+var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
+var gTestBrowser = null;
 
 add_task(function* () {
   registerCleanupFunction(function () {
     clearAllPluginPermissions();
     setTestPluginEnab