Simulate Fission for browser actors by blocking them from receiving subframe events

RESOLVED FIXED in Firefox 64

Status

()

P3
normal
RESOLVED FIXED
6 months ago
5 months ago

People

(Reporter: Felipe, Assigned: Felipe)

Tracking

(Blocks: 2 bugs)

Trunk
Firefox 64
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

(Whiteboard: [fxperf:p1])

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
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)
(Assignee)

Updated

6 months ago
Whiteboard: [fxperf:p1]
Priority: -- → P3
(Assignee)

Comment 1

6 months ago
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
Attachment #9010525 - Attachment is obsolete: true
(Assignee)

Updated

6 months ago
Blocks: 1493984
Attachment #9010525 - Attachment is obsolete: false
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+
(Assignee)

Updated

6 months ago
Blocks: 1451850

Comment 4

6 months ago
Pushed by fgomes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3339b4bf9acd
Simulate Fission for browser actors by blocking them from receiving sub-frame events. r=kmag

Comment 5

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3339b4bf9acd
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
status-firefox64: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
(Assignee)

Comment 6

6 months ago
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
(Assignee)

Updated

5 months ago
Blocks: 1505898
You need to log in before you can comment on or make changes to this bug.