Closed Bug 1700092 Opened 3 years ago Closed 2 years ago

Expose watcherTraits in target actors

Categories

(DevTools :: Style Editor, task)

task

Tracking

(Fission Milestone:Future, firefox102 fixed)

RESOLVED FIXED
102 Branch
Fission Milestone Future
Tracking Status
firefox102 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(1 file, 1 obsolete file)

In Bug 1685268, we're going to introduce a temporary solution to check if a watcher has support for stylesheet resources. When Bug 1644397 lands we should be able to refactor that by exercising addDataEntry instead (when the pref we're setting in Bug 1644397 is set to true).

Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Fission Milestone: --- → MVP
Attachment #9210953 - Attachment description: Bug 1700092 - [devtools] Use the StyleSheetManager in style-related actors. . → Bug 1700092 - [devtools] Add SUPPORTED_RESOURCES watcherData and use it to check stylesheet watcher support
Fission Milestone: MVP → Future
Whiteboard: dt-fission-m3-mvp → dt-fission-m4-mvp
Whiteboard: dt-fission-m4-mvp
Attachment #9210953 - Attachment is obsolete: true

The situation changed since last year. We now pass around a sessionContext object to the content processes, so we can put the watcherTraits there.

Summary: Use addDataEntry to handle hasStyleSheetWatcherSupport → Add watcherTraits in sessionContext

This allows us to simplify and fix hasStyleSheetWatcherSupportForTarget.

In the browser toolbox, since we're in a "all" session context type, TargetActorRegistry.getTargetActors
would only return an array of a single element, the parent process target.
In case of window global targets, in the browser toolbox context, we wouldn't
find the target we're looking for, which was making hasStyleSheetWatcherSupportForTarget
return false.

We can now simply look into the sessionContext watcherTraits property.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Summary: Add watcherTraits in sessionContext → Expose watcherTraits in target actors
Attachment #9276261 - Attachment description: Bug 1700092 - [devtools] Add watcherTraits to sessionContext. r=bomsy. → Bug 1700092 - [devtools] Add watcherTraits to target actors. r=bomsy.
Attachment #9276261 - Attachment description: Bug 1700092 - [devtools] Add watcherTraits to target actors. r=bomsy. → Bug 1700092 - [devtools] Add supported targets and resources to session context. r=bomsy,ochameau.
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ea32c4c1d987
[devtools] Add supported targets and resources to session context. r=bomsy,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Regressions: 1772239
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: