This patch applies all the changes needed to the devtools actors
and the toolbox-process-window, to be able to debug a webextension
running in an extension child process (as well as a webextension
running in the main process).
The devtools actor used to debug a webextension is splitted into
3 actors:
- the WebExtensionActor is the actor that is created when the
"root.listTabs" RDP request is received, it provides the addon
metadata (name, icon and addon id) and two RDP methods:
- reload: used to reload the addon (e.g. from the "about:debugging#addons" page)
- connectAddonDebuggingActor: which provides the actorID of the actor
that is connected to the process where the extension is running
(used by toolbox-process-window.js to connect the toolbox to the needed
devtools actors, e.g. console, inspector etc.)
- the WebExtensionParentActor is the actor that connects to the
process where the extension is running and ensures that a
WebExtensionChildActor instance is created and connected
(this actor is only the entrypoint to reach the WebExtensionChildActor,
and so it does not provide any RDP request on its own, it only connect
itself to its child counterpart and then it returns the RDP "form" of
the child actor, and the client is then connected directly to the
child actor)
- the WebExtensionChildActor is the actor that is running in the same
process of the target extension, and it provides the same requestTypes
of a tab actor.
By splitting the WebExtensionActor from the WebExtensionParentActor, we are
able to prevent the RemoteDebuggingServer to connect (and create
instances of the WebExtensionChildActor) for every addon listed by
a root.listAddons() request.
MozReview-Commit-ID: L1vxhA6xQkD
--HG--
extra : rebase_source : f9438b4a9842c1dd504edf2fcd87857c670f411f
An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:
https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure
For information on how to build Mozilla from the source code, see:
https://developer.mozilla.org/en/docs/Build_Documentation
To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:
https://developer.mozilla.org/en/docs/Creating_a_patch
https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree
If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]
You can download nightly development builds from the Mozilla FTP server.
Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy. Firefox nightlies, for example, can be found at:
https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
- or -
https://nightly.mozilla.org/