Closed Bug 1493984 Opened 6 years ago Closed 6 years ago

Simulate Fission API for communicating between parent and children processes

Categories

(Firefox :: General, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 65
Fission Milestone M4
Tracking Status
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: Felipe, Assigned: Felipe)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Similarly to bug 1490810, we should simulate some sort of a fission API to allow the parent process to directly communicate with child actors related to subframes through sendMessage/receiveMessage.

This should help us write code that is closer to what's being designed for the JS IPDL APIs
Assignee: nobody → felipc
Blocks: fission
Summary: Simulate Fission behavior for browser actors' receiveMessage → Simulate Fission API for communicating between parent and children processes
This fixes the addEventListener in ActorChild that I got wrong on bug 1490810, as it was still directly adding the events to the message manager, instead of going through the dispatcher (which can simulate the Fission process boundaries). ActorChild.addEventListener is meant for actors to add more events after they are constructed (that were not declared in nsBrowserGlue or ActorManagerParent)
This patch adds a messaging mechanism to actors that work like this:

If browser.fission.simulate is true, messages handled by ActorManagerChild will only be dispatched to an actor tied to a specific frame, specified either by its frameId (outerWindowId) or by its browsingContextId. Messages that lack the information about the destination frame will be considered meant for the top-level frame.

In addition, a sendMessage API is added to ActorChild that automatically adds the id information to the outbound message, making it easier for it to be handled in the parent.

The frameId support is to ease the transition of some code that is already using outerWindowIds. For new code, it is preferred to use the browsing context ids, together with bug 1496840
Blocks: 1497280
Some events that actors need to listen to are chrome events which are not received by the listener in the window (even with mozSystemGroup = true).
Attachment #9015292 - Attachment description: Bug 1493984 - Change event listener to the mm to be able to receive chrome events. r=kmag → Bug 1493984 - Change event listener to the mm to be able to receive chrome events. r=mconley
Attachment #9014938 - Attachment description: Bug 1493984 - Part 0. Fix ActorChild.addEventListener. r=kmag → Bug 1493984 - Part 0. Fix ActorChild.addEventListener. r=mconley
Attachment #9014939 - Attachment description: Bug 1493984 - Implement Fission-aware message handling to actors. r=kmag → Bug 1493984 - Implement Fission-aware message handling to actors. r=mconley
Pushed by fgomes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d03a1eb789c5
Part 0. Fix ActorChild.addEventListener. r=mconley
https://hg.mozilla.org/integration/autoland/rev/8e32732468a3
Implement Fission-aware message handling to actors. r=mconley
https://hg.mozilla.org/integration/autoland/rev/e4acca06cb52
Change event listener to the mm to be able to receive chrome events. r=mconley
https://hg.mozilla.org/mozilla-central/rev/d03a1eb789c5
https://hg.mozilla.org/mozilla-central/rev/8e32732468a3
https://hg.mozilla.org/mozilla-central/rev/e4acca06cb52
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65

Retroactively moving fixed bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to an appropriate Fission Milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → M4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: