Allow filtering which globals WindowActors apply to
Categories
(Core :: DOM: Content Processes, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: nika, Assigned: jdai)
References
Details
Attachments
(4 files)
Additional options should be added to the WindowActorOptions
struct to control which globals are permitted to create actors of the given type.
dictionary WindowActorOptions {
// Allow overriding the matching behaviour for documents specified.
// If a MozDocumentMatcher is specified, only documents which match
// are allowed to have the given actor created for them. Other
// documents will fail to have their actor constructed, returning
// `nullptr`.
(MozDocumentMatcher or MozDocumentMatcherInit) matches;
}
Note that in the initial version, documents which have a matches
property will be unable to be constructed directly from the parent process using getActor
, as it will not be possible to efficiently check for document matches. In the future this will be relaxed.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
I plan to align matching mechanism[1] to the JS Window Actors.
dictionary WindowActorOptions {
// An array of URL match patterns (as accepted by the MatchPattern
// class in MatchPattern.webidl) which restrict which pages the actor
// may be instantiated for. If this is defined, only documents which match
// are allowed to have the given actor created for them. Other
// documents will fail to have their actor constructed, returning
// nullptr
.
sequence<ByteString> matches;
}
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns
Comment 3•6 years ago
|
||
One thing to highlight is that it's important that the actors get constructed for internal page changes, such as when a normal webpage fails to load, and then internally it's loading about:neterror, even though externally the normal URI.
There are actors that we will want to register only for this type of pages (about:neterror, :certerror, :tabcrashed, etc.)
![]() |
||
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D24203
Assignee | ||
Comment 6•6 years ago
|
||
Depends on D24204
Assignee | ||
Comment 7•6 years ago
|
||
Depends on D24205
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3a212aece7e4
https://hg.mozilla.org/mozilla-central/rev/1d112c578b34
https://hg.mozilla.org/mozilla-central/rev/06a189e6b675
https://hg.mozilla.org/mozilla-central/rev/54f0ce4913e0
Comment 10•6 years ago
|
||
Description
•