mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
Bug 942756 - Unify debugger server startup: fix HUD. r=fabrice
This commit is contained in:
parent
1a7cdd2eef
commit
54851b2e41
@ -15,6 +15,10 @@ XPCOMUtils.defineLazyGetter(this, 'DebuggerClient', function() {
|
||||
return Cu.import('resource://gre/modules/devtools/dbg-client.jsm', {}).DebuggerClient;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, 'DebuggerServer', function() {
|
||||
return Cu.import('resource://gre/modules/devtools/dbg-server.jsm', {}).DebuggerServer;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, 'WebConsoleUtils', function() {
|
||||
return devtools.require('devtools/toolkit/webconsole/utils').Utils;
|
||||
});
|
||||
@ -58,7 +62,7 @@ let developerHUD = {
|
||||
return;
|
||||
|
||||
if (!DebuggerServer.initialized) {
|
||||
RemoteDebugger.start();
|
||||
DebuggerServer.controller.start(null);
|
||||
}
|
||||
|
||||
// We instantiate a local debugger connection so that watchers can use our
|
||||
|
@ -80,9 +80,6 @@ DebuggerServerController.prototype = {
|
||||
// nsIDebuggerController
|
||||
|
||||
start: function(portOrPath) {
|
||||
if (!portOrPath) {
|
||||
throw new Error("No TCP port or unix socket path specified.");
|
||||
}
|
||||
|
||||
if (!this.debugger.initialized) {
|
||||
// Ask for remote connections.
|
||||
@ -133,10 +130,12 @@ DebuggerServerController.prototype = {
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
this.debugger.openListener(portOrPath);
|
||||
} catch (e) {
|
||||
dump("Unable to start debugger server (" + portOrPath + "): " + e + "\n");
|
||||
if (portOrPath) {
|
||||
try {
|
||||
this.debugger.openListener(portOrPath);
|
||||
} catch (e) {
|
||||
dump("Unable to start debugger server (" + portOrPath + "): " + e + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user