Implement in-child versions of TabActor and ThreadActor

RESOLVED WONTFIX

Status

defect
P1
normal
RESOLVED WONTFIX
6 years ago
10 months ago

People

(Reporter: jimb, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
FxOS apps and web content JavaScript run in content child subprocesses, not in the main B2G process. SpiderMonkey's Debugger API is not cross-process, nor cross-thread, nor even cross-JSRuntime, so all JavaScript debugging on Gecko, whether content, chrome, remote, or local, entails running JS code of some sort that uses the Debugger API in the same process and runtime as the debuggee. (That JS code must run in a different compartment than the debuggee, perhaps with chrome privileges.) That JS code implements the server side of a JSON-based protocol, for which the Firefox Developer Tools' JavaScript debugger UI is the client.

With bug 878958, the debugging protocol server that runs in the main B2G process will have the ability to enumerate content child processes and "attach" to them. Attaching to a child process starts a new debugging protocol server in the child process, with its own root actor. This root actor should respond to a 'listTabs' request by enumerating any apps and content tabs present in the child process in which the root actor is running. The response should name actors to which the client may attach --- perhaps tab actors, as described in the protocol, or perhaps a new kind of "app actor" --- to debug whatever content pages or apps are present in that child process. The client should eventually end up talking to a "thread-like actor", of the sort implemented by ThreadActor in toolkit/devtools/server/actors/script.js.

Here's a protocol spec that describes child actors, the listTabs request, tab actors, and thread-like actors: https://github.com/jimblandy/DebuggerDocs/blob/b2g-subprocesses/protocol
(Reporter)

Updated

6 years ago
Blocks: 879639
(Reporter)

Updated

6 years ago
No longer blocks: 797627
Priority: -- → P1
Is this bug still relevant? Same question for the dependency.
I have the distinct feeling that this bug is no longer relevant. Alex, you've been working on this, can you confirm whether this bug is still necessary?
Flags: needinfo?(poirot.alex)
See bug 879639 comment 5.
Flags: needinfo?(poirot.alex)
Summary: JS debugger: Need FxOS in-child implementations of TabActor, ThreadActor → Implement in-child versions of TabActor and ThreadActor
Given that we already have a way to reach the child process through the messageManager and we're also thinking of converting to the Chrome protocol as well, I don't think we would try to change our approach for reaching the child process in our own protocol anymore.

If the situation changes, we can always revisit this work later.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 5

3 years ago
Agreed.

Updated

10 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.