Last Comment Bug 761252 - Missing devtools.debugger.remote-enabled pref breaks Marionette in B2G
: Missing devtools.debugger.remote-enabled pref breaks Marionette in B2G
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Debugger (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: James Long (:jlongster)
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-04 11:40 PDT by Jonathan Griffin (:jgriffin)
Modified: 2012-06-13 10:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Jonathan Griffin (:jgriffin) 2012-06-04 11:40:15 PDT
Since bug 758696 landed, the remote debugger server won't open a listener unless devtools.debugger.remote-enabled is true.  This pref is not true by default for B2G, so Marionette fails to load.

I'm going to land a patch on m-c to set this pref on B2G so we can get tests running again.

However, longer term, what's the right solution?  I'm not sure it makes sense to share a single pref among all consumers of the remote debugger server, especially given that the current code also shares this pref between a particular implementation of a remote debugger (http://mxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/DebuggerUI.jsm#451), and dbg-server.js, which all implementers have in common.

Maybe openConnection() should accept an isEnabled callback as a parameter, which would allow implementers to define their own mechanism for enabling/disabling?  This seems consistent with the way that init() and initTransport() accept an aAllowConnectionCallback parameter.

Otherwise, enabling Marionette will enable the remote-debugger (at least potentially) and vice versa, and I'm not sure that's what we'd always want, although maybe it is.
Comment 1 Jonathan Griffin (:jgriffin) 2012-06-04 11:47:16 PDT
I just landed this patch as a (probably) temporary measure to get Marionette working again:

http://hg.mozilla.org/mozilla-central/rev/26dcd1b1a208
Comment 2 Panos Astithas [:past] 2012-06-05 00:08:57 PDT
Thanks for fixing this and sorry for the breakage. I should have thought of Marionette.

The reason for the pref is a requirement from the security team to:
(a) have a knob that keeps remote connections disabled until we are ready to roll them out
(b) have a means for the user to disable the debugger server, perhaps after having enabled it in order to be assisted in debugging something from someone else

You change is exactly what I would have done, had it occurred to me earlier. Since this is a security feature, I don't believe we want to deviate too much among products. All current and forthcoming users of the remote debugging protocol need this control, except Marionette: Firefox, Fennec and B2G, as well as NetMonitor/Firebug, Profiler and others, in the (not so distant) future.
Comment 3 Jonathan Griffin (:jgriffin) 2012-06-13 10:58:13 PDT
Closing this based on comment #2

Note You need to log in before you can comment on or make changes to this bug.