Bug 933273 - Prevent loading AddonManager in webbrowser actor when not explicitely needed. r=nfitzgerald, a=lsblakk
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 04 Nov 2013 17:30:10 -0500
changeset 166415 6047fcf502a785b5380330acd4da4bf53b6c6c1d
parent 166414 3c9f15727c3161b416c6254f287c5ea574185b7c
child 166416 2a13504c19cd3aa3f2cb223ec8c5cb01d6564f72
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfitzgerald, lsblakk
bugs933273
milestone27.0a2
Bug 933273 - Prevent loading AddonManager in webbrowser actor when not explicitely needed. r=nfitzgerald, a=lsblakk
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
@@ -852,18 +853,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() {