From ca9b0fb21c2622a5d880d762bf629aab343ac24d Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Tue, 6 Aug 2013 17:56:45 -0400 Subject: [PATCH] Bug 900500 - Add pref to bypass devtool's prompt on remote connection. r=robcee, r=mgoodwin --- modules/libpref/src/init/all.js | 3 ++- toolkit/devtools/server/main.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index 81b731447854..f9499e5703a4 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -453,7 +453,8 @@ pref("devtools.debugger.remote-enabled", false); pref("devtools.debugger.remote-port", 6000); // Force debugger server binding on the loopback interface pref("devtools.debugger.force-local", true); - +// Display a prompt when a new connection starts to accept/reject it +pref("devtools.debugger.prompt-connection", true); // Temporary setting to enable webapps actors pref("devtools.debugger.enable-content-actors", false); diff --git a/toolkit/devtools/server/main.js b/toolkit/devtools/server/main.js index 5761d2e15946..68135de2c0be 100644 --- a/toolkit/devtools/server/main.js +++ b/toolkit/devtools/server/main.js @@ -20,6 +20,7 @@ const DBG_STRINGS_URI = "chrome://global/locale/devtools/debugger.properties"; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); let wantLogging = Services.prefs.getBoolPref("devtools.debugger.log"); +const promptConnections = Services.prefs.getBoolPref("devtools.debugger.prompt-connection"); Cu.import("resource://gre/modules/jsdebugger.jsm"); addDebuggerToGlobal(this); @@ -443,7 +444,7 @@ var DebuggerServer = { onSocketAccepted: makeInfallible(function DS_onSocketAccepted(aSocket, aTransport) { - if (!this._allowConnection()) { + if (promptConnections && !this._allowConnection()) { return; } dumpn("New debugging connection on " + aTransport.host + ":" + aTransport.port);