Bug 745985: DebuggerServer.initTransport is never called directly, and doesn't do anything interesting. r=past
authorJim Blandy <jimb@mozilla.com>
Mon, 05 Jan 2015 16:54:19 -0800
changeset 223083 21a26d8e745748a8b34d8cf03d338c31c099a71c
parent 223082 80d398ab3ae5adc9c410bb7d90b9f63b325859d6
child 223084 367eacf58b48ccbee563964a111086fcbc46b6ff
push id28082
push usercbook@mozilla.com
push dateMon, 12 Jan 2015 10:44:52 +0000
treeherdermozilla-central@643589c3ef94 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs745985
milestone37.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 745985: DebuggerServer.initTransport is never called directly, and doesn't do anything interesting. r=past try: -b do -p all -u all -t none
toolkit/devtools/server/main.js
--- a/toolkit/devtools/server/main.js
+++ b/toolkit/devtools/server/main.js
@@ -141,17 +141,16 @@ function ModuleAPI() {
 };
 
 /***
  * Public API
  */
 var DebuggerServer = {
   _listeners: [],
   _initialized: false,
-  _transportInitialized: false,
   // Map of global actor names to actor constructors provided by extensions.
   globalActorFactories: {},
   // Map of tab actor names to actor constructors provided by extensions.
   tabActorFactories: {},
 
   LONG_STRING_LENGTH: 10000,
   LONG_STRING_INITIAL_LENGTH: 1000,
   LONG_STRING_READ_LENGTH: 65 * 1024,
@@ -166,37 +165,24 @@ var DebuggerServer = {
   /**
    * Initialize the debugger server.
    */
   init: function DS_init() {
     if (this.initialized) {
       return;
     }
 
-    this.initTransport();
+    this._connections = {};
+    this._nextConnID = 0;
 
     this._initialized = true;
   },
 
   get protocol() require("devtools/server/protocol"),
 
-  /**
-   * Initialize the debugger server's transport variables.  This can be
-   * in place of init() for cases where the jsdebugger isn't needed.
-   */
-  initTransport: function DS_initTransport() {
-    if (this._transportInitialized) {
-      return;
-    }
-
-    this._connections = {};
-    this._nextConnID = 0;
-    this._transportInitialized = true;
-  },
-
   get initialized() this._initialized,
 
   /**
    * Performs cleanup tasks before shutting down the debugger server. Such tasks
    * include clearing any actor constructors added at runtime. This method
    * should be called whenever a debugger server is no longer useful, to avoid
    * memory leaks. After this method returns, the debugger server must be
    * initialized again before use.
@@ -213,27 +199,26 @@ var DebuggerServer = {
     for (let id of Object.getOwnPropertyNames(gRegisteredModules)) {
       this.unregisterModule(id);
     }
     gRegisteredModules = Object.create(null);
 
     this.closeAllListeners();
     this.globalActorFactories = {};
     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) {
+    if (!this._initialized) {
       throw "DebuggerServer has not been initialized.";
     }
 
     if (!this.createRootActor) {
       throw "Use DebuggerServer.addActors() to add a root actor implementation.";
     }
   },