Bug 942756 - Unify debugger server startup: remove the temporary check to start-debugger-server in b2g desktop. r=fabrice

This commit is contained in:
Paul Rouget 2014-04-22 10:51:00 -04:00
parent b1de6dadc2
commit 0ca3fb1673

View File

@ -46,34 +46,7 @@ function setupButtons() {
});
}
function checkDebuggerPort() {
// XXX: To be removed once bug 942756 lands.
// We are hacking 'unix-domain-socket' pref by setting a tcp port (number).
// DebuggerServer.openListener detects that it isn't a file path (string),
// and starts listening on the tcp port given here as command line argument.
if (!window.arguments) {
return;
}
// Get the command line arguments that were passed to the b2g client
let args = window.arguments[0].QueryInterface(Ci.nsICommandLine);
let dbgport;
try {
dbgport = args.handleFlagWithParam('start-debugger-server', false);
} catch(e) {}
if (dbgport) {
dump('Opening debugger server on ' + dbgport + '\n');
Services.prefs.setCharPref('devtools.debugger.unix-domain-socket', dbgport);
navigator.mozSettings.createLock().set(
{'debugger.remote-mode': 'adb-devtools'});
}
}
window.addEventListener('ContentStart', function() {
enableTouch();
setupButtons();
checkDebuggerPort();
});