Closed Bug 1535408 Opened 1 year ago Closed 1 year ago

Add MozDocumentMatcher string to WindowActorChildOptions

Categories

(Core :: DOM: Content Processes, enhancement)

enhancement
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1523982

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

The JS Window Actor stuff that's been added recently is great, but one snag we've hit while trying to port some of our pre-existing MessageManager-based actors over is that our old mechanism allowed us to only load the child actors for particular pages that matched an optional "MozDocumentMatcher" string.

This is similar to how WebExtension content scripts can be scoped to particular pages: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns

Here's an example of where we use the MessageManager-based matching string:

https://searchfox.org/mozilla-central/rev/f1c7ba91fad60bfea184006f3728dd6ac48c8e56/browser/components/BrowserGlue.jsm#218-220

which is interpreted by ActorManagerChild here:

https://searchfox.org/mozilla-central/rev/f1c7ba91fad60bfea184006f3728dd6ac48c8e56/toolkit/modules/ActorManagerChild.jsm#281-304

Would it be possible to add a similar matching mechanism to the new JS Window Actors?

Flags: needinfo?(jdai)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1523982

I'm doing the same thing as you mention[1], but they aren't ready to review. :)

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1523982#c2

Flags: needinfo?(jdai)
You need to log in before you can comment on or make changes to this bug.