Closed Bug 1645334 Opened 5 years ago Closed 5 years ago

ProcessDescriptorActor isn't passing its browsingContext when creating its WatcherActor

Categories

(DevTools :: Framework, defect, P1)

defect

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

(Whiteboard: dt-fission-m2-mvp)

Attachments

(1 file)

The WatcherActor does have specific code to handle watching resources in parent process (devtools/server/actors/descriptors/watcher/watcher.js#188-200), by retrieving the browsingContextID from the browser option passed when instantiating it (devtools/server/actors/descriptors/watcher/watcher.js#35,57-59).

Unfortunately, in devtools/server/actors/descriptors/process.js#145, we're creating the WatcherActor for the ProcessDescriptorActor without the browser option, which means the watcherActor won't be able to retrieve the targetActor.
As a result, we won't watch resources in parent processes (you can see that by flipping the [Resources.TYPES.CONSOLE_MESSAGE] trait, opening the browser toolbox and evaluating console.log("bloup"); the bloup message won't appear).

Whiteboard: dt-fission-m2-mvp

The WatcherActor already has code to handle ParentProcessTargetActor, but since
the browsing context wasn't passed to the watcher actor when we were creating
it in the ProcessDescriptorActor, nothing was done (and we weren't watching
for resources on that target).
This patch fixes that, and also changes what the WatcherActor expects. It used
to take a whole browser object, but was only using it to retrieve the
browsing context id, so directly passing the id seems more straightforward.

Depends on D79294

Attachment #9156198 - Attachment description: Bug 1645334 - Pass the BrowsingContext id when creating WatcherActor from parent process. r=jdescottes,ochameau. → Bug 1645334 - Pass the parentProcessTargetActor as an option to WatcherActor. r=jdescottes,ochameau.
Attachment #9156198 - Attachment description: Bug 1645334 - Pass the parentProcessTargetActor as an option to WatcherActor. r=jdescottes,ochameau. → Bug 1645334 - Handle parentProcessTargetActor in WatcherActor. r=jdescottes,ochameau.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c124c1c7b2a4 Handle parentProcessTargetActor in WatcherActor. r=jdescottes,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: