Bug 933273 - Prevent loading AddonManager in webbrowser actor when not explicitely needed. r=nfitzgerald
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 04 Nov 2013 17:30:10 -0500
changeset 153438 c800ad2e84d2384287217377c7ed3a922b1f3caf
parent 153437 81e276c73edeabac19a5bfa886a438386a7d3cfc
child 153439 af76477c0003f3b815e2ef98a51902a65348c4d9
push id3335
push userryanvm@gmail.com
push dateMon, 04 Nov 2013 22:30:38 +0000
treeherderfx-team@c800ad2e84d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfitzgerald
bugs933273
milestone28.0a1
Bug 933273 - Prevent loading AddonManager in webbrowser actor when not explicitely needed. r=nfitzgerald
toolkit/devtools/server/actors/webbrowser.js
--- a/toolkit/devtools/server/actors/webbrowser.js
+++ b/toolkit/devtools/server/actors/webbrowser.js
@@ -3,16 +3,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";
 
 let promise = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js", {}).Promise;
 XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
+XPCOMUtils.defineLazyModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm");
 
 /**
  * Browser-specific actors.
  */
 
 /**
  * Yield all windows of type |aWindowType|, from the oldest window to the
  * youngest, using nsIWindowMediator::getEnumerator. We're usually
@@ -857,18 +858,16 @@ BrowserTabActor.prototype = {
  */
 BrowserTabActor.prototype.requestTypes = {
   "attach": BrowserTabActor.prototype.onAttach,
   "detach": BrowserTabActor.prototype.onDetach,
   "reload": BrowserTabActor.prototype.onReload,
   "navigateTo": BrowserTabActor.prototype.onNavigateTo
 };
 
-Components.utils.import("resource://gre/modules/AddonManager.jsm");
-
 function BrowserAddonList(aConnection)
 {
   this._connection = aConnection;
   this._actorByAddonId = new Map();
   this._onListChanged = null;
 }
 
 BrowserAddonList.prototype.getList = function() {