Backed out changesets e7aa50b69994, bc00eed50b7d, and 30a8127b9277 (bug 682048) for causing frequent B2G reftest timeouts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 03 Dec 2013 22:44:28 -0500
changeset 174350 874788e2239c90171780b64c577380d3a63996ed
parent 174349 771052f15a6cbe186bf17055e8dcd08f20002964
child 174351 c5e505d54ea6d190eb5edc6c414ac9d90ac8adc0
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs682048
milestone28.0a1
backs oute7aa50b699940b168766e40359b5deb8443d2e9f
bc00eed50b7d58bc620ecb6d68d0ae976044caaf
30a8127b9277deb536cafa063649fefff9af34e4
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
Backed out changesets e7aa50b69994, bc00eed50b7d, and 30a8127b9277 (bug 682048) for causing frequent B2G reftest timeouts. CLOSED TREE
b2g/components/ErrorPage.jsm
b2g/components/PaymentGlue.js
b2g/components/SignInToWebsite.jsm
browser/base/content/test/social/social_crash_content_helper.js
browser/components/sessionstore/test/content.js
browser/components/tabview/content.js
browser/metro/base/content/Util.js
browser/metro/base/content/bindings/browser.js
browser/metro/base/content/contenthandlers/ConsoleAPIObserver.js
browser/metro/base/content/contenthandlers/Content.js
browser/metro/base/content/contenthandlers/ContextMenuHandler.js
browser/metro/base/content/contenthandlers/FindHandler.js
browser/metro/base/content/contenthandlers/FormHelper.js
browser/metro/base/content/contenthandlers/SelectionHandler.js
browser/metro/base/content/library/SelectionPrototype.js
dom/inputmethod/Keyboard.jsm
testing/marionette/marionette-frame-manager.js
testing/marionette/marionette-listener.js
testing/marionette/marionette-server.js
testing/specialpowers/content/MozillaLogger.js
testing/specialpowers/content/specialpowers.js
testing/specialpowers/content/specialpowersAPI.js
toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
toolkit/mozapps/extensions/addonManager.js
--- a/b2g/components/ErrorPage.jsm
+++ b/b2g/components/ErrorPage.jsm
@@ -156,17 +156,17 @@ let ErrorPage = {
 
   observe: function errorPageObserve(aSubject, aTopic, aData) {
     let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader);
     let mm = frameLoader.messageManager;
 
     // This won't happen from dom/ipc/preload.js in non-OOP builds.
     try {
       if (Services.prefs.getBoolPref("dom.ipc.tabs.disabled") === true) {
-        mm.loadFrameScript(kErrorPageFrameScript, true, true);
+        mm.loadFrameScript(kErrorPageFrameScript, true);
       }
     } catch (e) {
       dump('Error loading ' + kErrorPageFrameScript + ' as frame script: ' + e + '\n');
     }
     mm.addMessageListener('ErrorPage:AddCertException', this._addCertException.bind(this));
   }
 };
 
--- a/b2g/components/PaymentGlue.js
+++ b/b2g/components/PaymentGlue.js
@@ -138,17 +138,17 @@ PaymentUI.prototype = {
 
       // Try to load the payment shim file containing the payment callbacks
       // in the content script.
       let frame = msg.frame;
       let frameLoader = frame.QueryInterface(Ci.nsIFrameLoaderOwner)
                              .frameLoader;
       let mm = frameLoader.messageManager;
       try {
-        mm.loadFrameScript(kPaymentShimFile, true, true);
+        mm.loadFrameScript(kPaymentShimFile, true);
         mm.sendAsyncMessage("Payment:LoadShim", { requestId: aRequestId });
       } catch (e) {
         if (this._debug) {
           this.LOG("Error loading " + kPaymentShimFile + " as a frame script: "
                     + e);
         }
         _error("ERROR_LOADING_PAYMENT_SHIM");
       } finally {
--- a/b2g/components/SignInToWebsite.jsm
+++ b/b2g/components/SignInToWebsite.jsm
@@ -282,17 +282,17 @@ Pipe.prototype = {
             // The window has opened.  Inject the identity shim file containing
             // the callbacks in the content script.  This could be either the
             // visible popup that the user interacts with, or it could be an
             // invisible frame.
             let frame = evt.detail.frame;
             let frameLoader = frame.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader;
             mm = frameLoader.messageManager;
             try {
-              mm.loadFrameScript(kIdentityShimFile, true, true);
+              mm.loadFrameScript(kIdentityShimFile, true);
               log("Loaded shim", kIdentityShimFile);
             } catch (e) {
               log("Error loading", kIdentityShimFile, "as a frame script:", e);
             }
 
             // There are two messages that the delegate can send back: a "do
             // method" event, and a "finished" event.  We pass the do-method
             // events straight to the caller for interpretation and handling.
--- a/browser/base/content/test/social/social_crash_content_helper.js
+++ b/browser/base/content/test/social/social_crash_content_helper.js
@@ -1,13 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let Cu = Components.utils;
-
 // Ideally we would use CrashTestUtils.jsm, but that's only available for
 // xpcshell tests - so we just copy a ctypes crasher from it.
 Cu.import("resource://gre/modules/ctypes.jsm");
 let crash = function() { // this will crash when called.
   let zero = new ctypes.intptr_t(8);
   let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
   badptr.contents
 };
--- a/browser/components/sessionstore/test/content.js
+++ b/browser/components/sessionstore/test/content.js
@@ -1,14 +1,12 @@
 /* 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;
-
 /**
  * This frame script is only loaded for sessionstore mochitests. It enables us
  * to modify and query docShell data when running with multiple processes.
  */
 
 addEventListener("MozStorageChanged", function () {
   sendSyncMessage("ss-test:MozStorageChanged");
 });
--- a/browser/components/tabview/content.js
+++ b/browser/components/tabview/content.js
@@ -1,16 +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 Cu = Components.utils;
-let Ci = Components.interfaces;
 
 Cu.import("resource:///modules/tabview/utils.jsm");
 
 // Bug 671101 - directly using webProgress in this context
 // causes docShells to leak
 this.__defineGetter__("webProgress", function () {
   let ifaceReq = docShell.QueryInterface(Ci.nsIInterfaceRequestor);
   return ifaceReq.getInterface(Ci.nsIWebProgress);
--- a/browser/metro/base/content/Util.js
+++ b/browser/metro/base/content/Util.js
@@ -1,15 +1,12 @@
 /* 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;
-
 Components.utils.import("resource:///modules/ContentUtil.jsm");
 
 let Util = {
   /*
    * General purpose utilities
    */
 
   getWindowUtils: function getWindowUtils(aWindow) {
@@ -406,10 +403,8 @@ Util.Timeout.prototype = {
 // Mixin the ContentUtil module exports
 {
   for (let name in ContentUtil) {
     let copy = ContentUtil[name];
     if (copy !== undefined)
       Util[name] = copy;
   }
 }
-
-this.Util = Util;
--- a/browser/metro/base/content/bindings/browser.js
+++ b/browser/metro/base/content/bindings/browser.js
@@ -659,17 +659,16 @@ let ContentScroll =  {
     // composition.
     sendSyncMessage("Browser:ContentScroll",
       { presShellId: presShellId.value,
         viewId: viewId,
         scrollOffset: scrollOffset,
         isRoot: isRoot });
   }
 };
-this.ContentScroll = ContentScroll;
 
 ContentScroll.init();
 
 let ContentActive =  {
   init: function() {
     addMessageListener("Content:Activate", this);
     addMessageListener("Content:Deactivate", this);
   },
--- a/browser/metro/base/content/contenthandlers/ConsoleAPIObserver.js
+++ b/browser/metro/base/content/contenthandlers/ConsoleAPIObserver.js
@@ -1,15 +1,12 @@
 /* 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 Cc = Components.classes;
-
 dump("### ConsoleAPIObserver.js loaded\n");
 
 /*
  * ConsoleAPIObserver
  *
  */ 
 
 var ConsoleAPIObserver = {
@@ -114,12 +111,11 @@ var ConsoleAPIObserver = {
     // Remove all but the last path component.
     let slashIndex = aSourceURL.lastIndexOf("/");
     if (slashIndex > -1)
       aSourceURL = aSourceURL.substring(slashIndex + 1);
 
     return aSourceURL;
   }
 };
-this.ConsoleAPIObserver = ConsoleAPIObserver;
 
 ConsoleAPIObserver.init();
 
--- a/browser/metro/base/content/contenthandlers/Content.js
+++ b/browser/metro/base/content/contenthandlers/Content.js
@@ -32,23 +32,23 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/LoginManagerContent.jsm");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gFocusManager",
   "@mozilla.org/focus-manager;1", "nsIFocusManager");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gDOMUtils",
   "@mozilla.org/inspector/dom-utils;1", "inIDOMUtils");
 
-this.XULDocument = Ci.nsIDOMXULDocument;
-this.HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
-this.HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
-this.HTMLFrameElement = Ci.nsIDOMHTMLFrameElement;
-this.HTMLFrameSetElement = Ci.nsIDOMHTMLFrameSetElement;
-this.HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
-this.HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;
+let XULDocument = Ci.nsIDOMXULDocument;
+let HTMLHtmlElement = Ci.nsIDOMHTMLHtmlElement;
+let HTMLIFrameElement = Ci.nsIDOMHTMLIFrameElement;
+let HTMLFrameElement = Ci.nsIDOMHTMLFrameElement;
+let HTMLFrameSetElement = Ci.nsIDOMHTMLFrameSetElement;
+let HTMLSelectElement = Ci.nsIDOMHTMLSelectElement;
+let HTMLOptionElement = Ci.nsIDOMHTMLOptionElement;
 
 const kReferenceDpi = 240; // standard "pixel" size used in some preferences
 
 const kStateActive = 0x00000001; // :active pseudoclass for elements
 
 const kZoomToElementMargin = 16; // in px
 
 /*
@@ -77,17 +77,16 @@ function getBoundingContentRect(aElement
     let rect = frame.frameElement.getBoundingClientRect();
     let left = frame.getComputedStyle(frame.frameElement, "").borderLeftWidth;
     let top = frame.getComputedStyle(frame.frameElement, "").borderTopWidth;
     offset.add(rect.left + parseInt(left), rect.top + parseInt(top));
   }
 
   return new Rect(r.left + offset.x, r.top + offset.y, r.width, r.height);
 }
-this.getBoundingContentRect = getBoundingContentRect;
 
 /*
  * getOverflowContentBoundingRect
  *
  * @param aElement
  * @return Bounding content rect adjusted for scroll and frame offsets.
  */
 
@@ -104,17 +103,16 @@ function getOverflowContentBoundingRect(
   }
 
   for (let i = 0; i < aElement.childElementCount; i++) {
     r = r.union(getBoundingContentRect(aElement.children[i]));
   }
 
   return r;
 }
-this.getOverflowContentBoundingRect = getOverflowContentBoundingRect;
 
 /*
  * Content
  *
  * Browser event receiver for content.
  */
 let Content = {
   _debugEvents: false,
@@ -581,11 +579,10 @@ var FormSubmitObserver = {
   QueryInterface : function(aIID) {
     if (!aIID.equals(Ci.nsIFormSubmitObserver) &&
         !aIID.equals(Ci.nsISupportsWeakReference) &&
         !aIID.equals(Ci.nsISupports))
       throw Cr.NS_ERROR_NO_INTERFACE;
     return this;
   }
 };
-this.Content = Content;
 
 FormSubmitObserver.init();
--- a/browser/metro/base/content/contenthandlers/ContextMenuHandler.js
+++ b/browser/metro/base/content/contenthandlers/ContextMenuHandler.js
@@ -1,16 +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 Ci = Components.interfaces;
-let Cc = Components.classes;
-
-this.kXLinkNamespace = "http://www.w3.org/1999/xlink";
+const kXLinkNamespace = "http://www.w3.org/1999/xlink";
 
 dump("### ContextMenuHandler.js loaded\n");
 
 var ContextMenuHandler = {
   _types: [],
   _previousState: null,
 
   init: function ch_init() {
@@ -381,11 +378,10 @@ var ContextMenuHandler = {
     this._types.push({name: aName, handler: aHandler});
   },
 
   /** Remove all handlers registered for a given type. */
   unregisterType: function unregisterType(aName) {
     this._types = this._types.filter(function(type) type.name != aName);
   }
 };
-this.ContextMenuHandler = ContextMenuHandler;
 
 ContextMenuHandler.init();
--- a/browser/metro/base/content/contenthandlers/FindHandler.js
+++ b/browser/metro/base/content/contenthandlers/FindHandler.js
@@ -1,15 +1,12 @@
 /* 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 Cc = Components.classes;
-
 dump("### FindHandler.js loaded\n");
 
 var FindHandler = {
   get _fastFind() {
     delete this._fastFind;
     this._fastFind = Cc["@mozilla.org/typeaheadfind;1"].createInstance(Ci.nsITypeAheadFind);
     this._fastFind.init(docShell);
     return this._fastFind;
@@ -81,11 +78,10 @@ var FindHandler = {
         rect: rect.isEmpty() ? null: rect,
         contentHeight: content.document.documentElement.scrollHeight,
         result: findResult
       });
     });
     timer.once(0);
   }
 };
-this.FindHandler = FindHandler;
 
 FindHandler.init();
--- a/browser/metro/base/content/contenthandlers/FormHelper.js
+++ b/browser/metro/base/content/contenthandlers/FormHelper.js
@@ -571,17 +571,16 @@ FormAssistant.prototype = {
       let node = aNodes[i];
       if (node.type == "radio" && chosenRadios[node.name] != node)
         continue;
       result.push(node);
     }
     return result;
   }
 };
-this.FormAssistant = FormAssistant;
 
 
 /******************************************************************************
  * The next classes wraps some forms elements such as different type of list to
  * abstract the difference between html and xul element while manipulating them
  *  - SelectWrapper   : <html:select>
  *  - MenulistWrapper : <xul:menulist>
  *****************************************************************************/
@@ -700,17 +699,16 @@ SelectWrapper.prototype = {
     evt.initEvent("change", true, true, this._control.ownerDocument.defaultView, 0,
                   false, false,
                   false, false, null);
     content.setTimeout(function() {
       control.dispatchEvent(evt);
     }, 0);
   }
 };
-this.SelectWrapper = SelectWrapper;
 
 
 // bug 559792
 // Use wrappedJSObject when control is in content for extra protection
 function MenulistWrapper(aControl) {
   this._control = aControl;
 }
 
@@ -758,9 +756,8 @@ MenulistWrapper.prototype = {
     evt.initCommandEvent("command", true, true, window, 0,
                          false, false,
                          false, false, null);
     content.setTimeout(function() {
       control.dispatchEvent(evt);
     }, 0);
   }
 };
-this.MenulistWrapper = MenulistWrapper;
--- a/browser/metro/base/content/contenthandlers/SelectionHandler.js
+++ b/browser/metro/base/content/contenthandlers/SelectionHandler.js
@@ -1,15 +1,12 @@
 /* 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 Cc = Components.classes;
-
 dump("### SelectionHandler.js loaded\n");
 
 var SelectionHandler = {
   init: function init() {
     this.type = kContentSelector;
     this.snap = true;
     this.lastYPos = this.lastXPos = null;
     addMessageListener("Browser:SelectionStart", this);
@@ -594,13 +591,12 @@ var SelectionHandler = {
       if (docShell == null)
         return null;
       return docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                      .getInterface(Ci.nsISelectionDisplay)
                      .QueryInterface(Ci.nsISelectionController);
     }
   },
 };
-this.SelectionHandler = SelectionHandler;
 
 SelectionHandler.__proto__ = new SelectionPrototype();
 SelectionHandler.init();
 
--- a/browser/metro/base/content/library/SelectionPrototype.js
+++ b/browser/metro/base/content/library/SelectionPrototype.js
@@ -1,27 +1,24 @@
 /* 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 Ci = Components.interfaces;
-let Cc = Components.classes;
-
 /*
  * SelectionPrototype - common base class used by both chrome and content selection logic.
  */
 
 // selection node parameters for various apis
-this.kSelectionNodeAnchor = 1;
-this.kSelectionNodeFocus = 2;
+const kSelectionNodeAnchor = 1;
+const kSelectionNodeFocus = 2;
 
 // selection type property constants
-this.kChromeSelector = 1;
-this.kContentSelector = 2;
+const kChromeSelector = 1;
+const kContentSelector = 2;
 
 dump("### SelectionPrototype.js loaded\n");
 
 /*
   http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsIDocShell.idl
   http://mxr.mozilla.org/mozilla-central/source/content/base/public/nsISelectionDisplay.idl
   http://mxr.mozilla.org/mozilla-central/source/content/base/public/nsISelectionListener.idl
   http://mxr.mozilla.org/mozilla-central/source/content/base/public/nsISelectionPrivate.idl
@@ -949,9 +946,8 @@ SelectionPrototype.prototype = {
    * in init().
    */
   _setDebugPoint: function _setDebugPoint(aX, aY, aColor) {
     let rect = { left: aX - 2, top: aY - 2,
                  right: aX + 2, bottom: aY + 2 };
     this._setDebugRect(rect, aColor, true);
   },
 };
-this.SelectionPrototype = SelectionPrototype;
--- a/dom/inputmethod/Keyboard.jsm
+++ b/dom/inputmethod/Keyboard.jsm
@@ -80,17 +80,17 @@ this.Keyboard = {
     mm.addMessageListener('Forms:GetContext:Result:OK', this);
     mm.addMessageListener('Forms:SetComposition:Result:OK', this);
     mm.addMessageListener('Forms:EndComposition:Result:OK', this);
 
     // When not running apps OOP, we need to load forms.js here since this
     // won't happen from dom/ipc/preload.js
     try {
       if (Services.prefs.getBoolPref("dom.ipc.tabs.disabled") === true) {
-        mm.loadFrameScript(kFormsFrameScript, true, true);
+        mm.loadFrameScript(kFormsFrameScript, true);
       }
     } catch (e) {
       dump('Error loading ' + kFormsFrameScript + ' as frame script: ' + e + '\n');
     }
   },
 
   receiveMessage: function keyboardReceiveMessage(msg) {
     // If we get a 'Keyboard:XXX' message, check that the sender has the
--- a/testing/marionette/marionette-frame-manager.js
+++ b/testing/marionette/marionette-frame-manager.js
@@ -121,17 +121,17 @@ FrameManager.prototype = {
         return;
       }
     }
 
     // If we get here, then we need to load the frame script in this frame, 
     // and set the frame's ChromeMessageSender as the active message manager the server will listen to
     this.addMessageManagerListeners(mm);
     logger.info("frame-manager load script: " + mm.toString());
-    mm.loadFrameScript(FRAME_SCRIPT, true, true);
+    mm.loadFrameScript(FRAME_SCRIPT, true);
     let aFrame = new MarionetteRemoteFrame(message.json.win, message.json.frame);
     aFrame.messageManager = Cu.getWeakReference(mm);
     remoteFrames.push(aFrame);
     this.currentRemoteFrame = aFrame;
   },
 
   /*
    * This function handles switching back to the frame that was interrupted by the modal dialog.
--- a/testing/marionette/marionette-listener.js
+++ b/testing/marionette/marionette-listener.js
@@ -256,17 +256,17 @@ function deleteSession(msg) {
   removeMessageListenerId("Marionette:screenShot", screenShot);
   removeMessageListenerId("Marionette:addCookie", addCookie);
   removeMessageListenerId("Marionette:getAllCookies", getAllCookies);
   removeMessageListenerId("Marionette:deleteAllCookies", deleteAllCookies);
   removeMessageListenerId("Marionette:deleteCookie", deleteCookie);
   if (isB2G) {
     content.removeEventListener("mozbrowsershowmodalprompt", modalHandler, false);
   }
-  elementManager.reset();
+  this.elementManager.reset();
   // reset frame to the top-most frame
   curFrame = content;
   curFrame.focus();
   touchIds = {};
 }
 
 /*
  * Helper methods 
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -2444,17 +2444,17 @@ BrowserObj.prototype = {
    * Loads content listeners if we don't already have them
    *
    * @param string script
    *        path of script to load
    * @param nsIDOMWindow frame
    *        frame to load the script in
    */
   loadFrameScript: function BO_loadFrameScript(script, frame) {
-    frame.window.messageManager.loadFrameScript(script, true, true);
+    frame.window.messageManager.loadFrameScript(script, true);
     Services.prefs.setBoolPref("marionette.contentListener", true);
   },
 
   /**
    * Registers a new frame, and sets its current frame id to this frame
    * if it is not already assigned, and if a) we already have a session 
    * or b) we're starting a new session and it is the right start frame.
    *
--- a/testing/specialpowers/content/MozillaLogger.js
+++ b/testing/specialpowers/content/MozillaLogger.js
@@ -111,11 +111,8 @@ MozillaFileLogger.prototype = {
     if(this._foStream)
       this._foStream.close();
   
     this._foStream = null;
     this._file = null;
   }
 };
 
-this.MozillaLogger = MozillaLogger;
-this.SpecialPowersLogger = SpecialPowersLogger;
-this.MozillaFileLogger = MozillaFileLogger;
--- a/testing/specialpowers/content/specialpowers.js
+++ b/testing/specialpowers/content/specialpowers.js
@@ -134,11 +134,8 @@ function SpecialPowersManager() {
 SpecialPowersManager.prototype = {
   handleEvent: function handleEvent(aEvent) {
     var window = aEvent.target.defaultView;
     attachSpecialPowersToWindow(window);
   }
 };
 
 var specialpowersmanager = new SpecialPowersManager();
-
-this.SpecialPowers = SpecialPowers;
-this.attachSpecialPowersToWindow = attachSpecialPowersToWindow;
--- a/testing/specialpowers/content/specialpowersAPI.js
+++ b/testing/specialpowers/content/specialpowersAPI.js
@@ -1640,12 +1640,8 @@ SpecialPowersAPI.prototype = {
     var msg = {
       'op': 'notify',
       'observerTopic': topic,
       'observerData': data
     };
     this._sendSyncMessage('SPObserverService', msg);
   },
 };
-
-this.SpecialPowersAPI = SpecialPowersAPI;
-this.bindDOMWindowUtils = bindDOMWindowUtils;
-this.getRawComponents = getRawComponents;
--- a/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
+++ b/toolkit/components/thumbnails/test/thumbnails_crash_content_helper.js
@@ -1,13 +1,11 @@
 /* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-let Cu = Components.utils;
-
 // Ideally we would use CrashTestUtils.jsm, but that's only available for
 // xpcshell tests - so we just copy a ctypes crasher from it.
 Cu.import("resource://gre/modules/ctypes.jsm");
 let crash = function() { // this will crash when called.
   let zero = new ctypes.intptr_t(8);
   let badptr = ctypes.cast(zero, ctypes.PointerType(ctypes.int32_t));
   badptr.contents
 };
--- a/toolkit/mozapps/extensions/addonManager.js
+++ b/toolkit/mozapps/extensions/addonManager.js
@@ -39,17 +39,17 @@ var gSingleton = null;
 function amManager() {
   Components.utils.import("resource://gre/modules/AddonManager.jsm");
 
   var messageManager = Cc["@mozilla.org/globalmessagemanager;1"].
                        getService(Ci.nsIMessageListenerManager);
 
   messageManager.addMessageListener(MSG_INSTALL_ENABLED, this);
   messageManager.addMessageListener(MSG_INSTALL_ADDONS, this);
-  messageManager.loadFrameScript(CHILD_SCRIPT, true);
+  messageManager.loadFrameScript(CHILD_SCRIPT, true, true);
 }
 
 amManager.prototype = {
   observe: function AMC_observe(aSubject, aTopic, aData) {
     if (aTopic == "addons-startup")
       AddonManagerPrivate.startup();
   },