Bug 754985: Move DebuggerServer._checkInit near the other initialization code. r=dcamp
authorJim Blandy <jimb@mozilla.com>
Mon, 05 Jan 2015 15:41:29 -0800
changeset 223140 80d398ab3ae5adc9c410bb7d90b9f63b325859d6
parent 223139 c0af000942219e2f30938e0059f128def6e51d82
child 223141 21a26d8e745748a8b34d8cf03d338c31c099a71c
push id10769
push usercbook@mozilla.com
push dateMon, 12 Jan 2015 14:15:52 +0000
treeherderfx-team@0e9765732906 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdcamp
bugs754985
milestone37.0a1
Bug 754985: Move DebuggerServer._checkInit near the other initialization code. r=dcamp try: -b do -p all -u xpcshell,mochitest-dt -t none
toolkit/devtools/server/main.js
--- a/toolkit/devtools/server/main.js
+++ b/toolkit/devtools/server/main.js
@@ -220,16 +220,29 @@ var DebuggerServer = {
     this.tabActorFactories = {};
     this._transportInitialized = false;
     this._initialized = false;
 
     dumpn("Debugger server is shut down.");
   },
 
   /**
+   * Raises an exception if the server has not been properly initialized.
+   */
+  _checkInit: function DS_checkInit() {
+    if (!this._transportInitialized) {
+      throw "DebuggerServer has not been initialized.";
+    }
+
+    if (!this.createRootActor) {
+      throw "Use DebuggerServer.addActors() to add a root actor implementation.";
+    }
+  },
+
+  /**
    * Load a subscript into the debugging global.
    *
    * @param aURL string A url that will be loaded as a subscript into the
    *        debugging global.  The user must load at least one script
    *        that implements a createRootActor() function to create the
    *        server's root actor.
    */
   addActors: function DS_addActors(aURL) {
@@ -925,29 +938,16 @@ var DebuggerServer = {
     });
 
     mm.sendAsyncMessage("debug:connect", { prefix: prefix });
 
     return deferred.promise;
   },
 
   /**
-   * Raises an exception if the server has not been properly initialized.
-   */
-  _checkInit: function DS_checkInit() {
-    if (!this._transportInitialized) {
-      throw "DebuggerServer has not been initialized.";
-    }
-
-    if (!this.createRootActor) {
-      throw "Use DebuggerServer.addActors() to add a root actor implementation.";
-    }
-  },
-
-  /**
    * Create a new debugger connection for the given transport. Called after
    * connectPipe(), from connectToParent, or from an incoming socket
    * connection handler.
    *
    * If present, |aForwardingPrefix| is a forwarding prefix that a parent
    * server is using to recognizes messages intended for this server. Ensure
    * that all our actors have names beginning with |aForwardingPrefix + '/'|.
    * In particular, the root actor's name will be |aForwardingPrefix + '/root'|.