Open Bug 1483992 Opened 6 years ago Updated 2 years ago

Make it possible to declare actors that only care about the top-level document

Categories

(Toolkit :: Async Tooling, enhancement)

enhancement

Tracking

()

People

(Reporter: mconley, Unassigned)

References

Details

Thanks to bug 1472491 and friends, we have this shiny new actor system in place of frame scripts, and we've also got a nice broken down view of the majority of the privileged script running in the content process.

One of the things we're going to want to do as Fission spins up is to make sure these Actors work in subframes, and don't accidentally try to synchronously access things across frame boundaries that they shouldn't.

There are a number of Actors that we can probably discount right away - namely, the ones that _only_ ever care about the top-level document. I think it should be possible to explicitly declare that an Actor is only expected to run in the top-level document, and to enforce that invariant programmatically.
This is already possible for actors which specify a "matches" key. They only apply to top-level documents unless they specify `"allFrames": true`.

We could probably handle this for other actors by having them specify `"allFrames": false`. It's a bit unfortunate to have different defaults depending on whether "matches" is specified, though, so perhaps we should default to `true` for those actors too...
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.