Bug 942756 - Unify debugger server startup: remove the temporary check to start-debugger-server in b2g desktop r=fabrice
☠☠ backed out by 9a6ce1646135 ☠ ☠
authorPaul Rouget <paul@mozilla.com>
Tue, 22 Apr 2014 10:51:00 +0200
changeset 180405 a45a8d47cf9c3c78c48b4b89c4cb6b21a6881205
parent 180404 ac1d4bc60841a9e6b96daa861ed94d376553aac2
child 180406 61f910c1aa722a911e88c959c1053286bd17eae4
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersfabrice
bugs942756
milestone31.0a1
Bug 942756 - Unify debugger server startup: remove the temporary check to start-debugger-server in b2g desktop r=fabrice
b2g/chrome/content/desktop.js
--- a/b2g/chrome/content/desktop.js
+++ b/b2g/chrome/content/desktop.js
@@ -41,39 +41,12 @@ function setupButtons() {
     rotateButton.classList.add('active');
   });
   rotateButton.addEventListener('touchend', function() {
     GlobalSimulatorScreen.flipScreen();
     rotateButton.classList.remove('active');
   });
 }
 
-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();
 });