Bug 988931 - Fix some race conditions in the devtools. r=ochameau
authorJan Keromnes <janx@linux.com>
Thu, 27 Mar 2014 14:58:02 -0400
changeset 175784 951c1b3e799ff679706864589910ef30f9cf1a09
parent 175783 98ac1097f8e27df03dedc09182c76a44eed68373
child 175785 7b9fab28c5918398d66b730f4b3973d96afdb880
push id26498
push userkwierso@gmail.com
push dateFri, 28 Mar 2014 03:08:07 +0000
treeherdermozilla-central@6fa163ff81a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs988931
milestone31.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 988931 - Fix some race conditions in the devtools. r=ochameau
toolkit/devtools/server/child.js
toolkit/devtools/server/main.js
--- a/toolkit/devtools/server/child.js
+++ b/toolkit/devtools/server/child.js
@@ -4,16 +4,17 @@
 
 "use strict";
 
 let chromeGlobal = this;
 
 // Encapsulate in its own scope to allows loading this frame script
 // more than once.
 (function () {
+  let Cu = Components.utils;
   let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
   const DevToolsUtils = devtools.require("devtools/toolkit/DevToolsUtils.js");
   const {DebuggerServer, ActorPool} = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {});
 
   if (!DebuggerServer.initialized) {
     DebuggerServer.init();
   }
 
--- a/toolkit/devtools/server/main.js
+++ b/toolkit/devtools/server/main.js
@@ -34,16 +34,17 @@ Object.defineProperty(this, "Components"
 
 const DBG_STRINGS_URI = "chrome://global/locale/devtools/debugger.properties";
 
 const nsFile = CC("@mozilla.org/file/local;1", "nsIFile", "initWithPath");
 Cu.import("resource://gre/modules/reflect.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 let wantLogging = Services.prefs.getBoolPref("devtools.debugger.log");
 
+Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js");
 Cu.import("resource://gre/modules/jsdebugger.jsm");
 addDebuggerToGlobal(this);
 
 function loadSubScript(aURL)
 {
   try {
     let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
       .getService(Ci.mozIJSSubScriptLoader);