Bug 1247203 - Emit devtools-loaded from the loader. r=jryans
authorAlexandre Poirot <poirot.alex@gmail.com>
Fri, 04 Mar 2016 07:51:11 -0800
changeset 323247 a668838de9dcb7c3ca77144e903c988443329bf9
parent 323246 81484938ac9917f182edd39e7fa837ae58b0e0e2
child 323248 80ad10b22bcc3412a05d2c4ef88722fea7b9ea3b
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1247203
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1247203 - Emit devtools-loaded from the loader. r=jryans
devtools/client/main.js
devtools/shared/Loader.jsm
--- a/devtools/client/main.js
+++ b/devtools/client/main.js
@@ -29,11 +29,8 @@ const unloadObserver = {
       }
       for (let definition of gDevTools.getThemeDefinitionArray()) {
         gDevTools.unregisterTheme(definition.id);
       }
     }
   }
 };
 Services.obs.addObserver(unloadObserver, "sdk:loader:destroy", false);
-
-const events = require("sdk/system/events");
-events.emit("devtools-loaded", {});
--- a/devtools/shared/Loader.jsm
+++ b/devtools/shared/Loader.jsm
@@ -239,16 +239,19 @@ DevToolsLoader.prototype = {
     }
     this._mainid = id;
     this._main = Loader.main(this.provider.loader, id);
 
     // Mirror the main module's exports on this object.
     Object.getOwnPropertyNames(this._main).forEach(key => {
       XPCOMUtils.defineLazyGetter(this, key, () => this._main[key]);
     });
+
+    var events = this.require("sdk/system/events");
+    events.emit("devtools-loaded", {});
   },
 
   /**
    * Override the provider used to load the tools.
    */
   setProvider: function(provider) {
     if (provider === this._provider) {
       return;