Bug 1490810 - Simulate Fission for browser actors by blocking them from receiving sub-frame events. r=kmag
46 bytes, text/x-phabricator-request
|Details | Review|
We want to have a pref, then an opt-in mechanism, and then an opt-out mechanism to allow us to write code in the browser actors in a Fission-compatible way. One of the main things that will change is that priviliged JS code (such as the code in frame scripts and actors) receive events from subframes, whereas that won't happen anymore with Fission. So we want to have a mechanism to simulate this in order to allow us to write code in a fission compatible way (and later prevent Fission-incompatible code from being landed). The idea for now is to make the ActorManagerChild to not forward the events to the actors unless it's for an actor related to frame. Another thing that will need to change is that, during construction, a lot of the actors register listeners directly with the message manager (`this.mm.addEventListeners`), and we're planning on adding an addEventListener method to the ActorChild class to intercept this (in the same manner that the pre-declared listeners work)
If the pref browser.fission.simulate is true, the event dispatcher in ActorManagerChild will not dispatch events to actors that aren't associated with the same window as the event's target. In addition, when that pref is on, the actors associated with sub-frames will have their content property bound to the correct content window, that might differ from the message manager's window (which is always related to the top level). Then, in order to write Fission-compatible code, that specific actor will need to be declared with allFrames = true, meaning that it wants to be instantiated for every frame, and not just top-level ones
Comment on attachment 9010525 [details] Bug 1490810 - Simulate Fission for browser actors by blocking them from receiving sub-frame events. r=kmag Kris Maglione [:kmag] has approved the revision.
Attachment #9010525 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/3339b4bf9acd Simulate Fission for browser actors by blocking them from receiving sub-frame events. r=kmag
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox64: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
FWIW I sent to tryserver a patch toggling this pref on to see what would fail: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f7edc779f2f8a95f9caddcb48770f74369d8726 Lots of failures, but very interesting results.. I looked at several of the failures and they were as expected: context menu failures, accessing the wrong content, timing out waiting for events, etc. Looks like this will be very useful to guide the work to make these features Fission-compatible
You need to log in before you can comment on or make changes to this bug.