Consider introducing JSProcessActors (JSWindowActor for PContent)
Categories
(Core :: DOM: Content Processes, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: nika, Assigned: Yoric)
References
(Blocks 1 open bug)
Details
Attachments
(9 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
This would be like JSWindowActor, but for content processes, and would eliminate one of the remaining usecases for the old MessageChannel APIs.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
kmag says this bug should block enabling Fission in Nightly (M6) because bug 1587058 blocks M6.
Comment 2•5 years ago
•
|
||
I believe this should be moved ahead to M5.
Unlike other (most of the?) work the Fission team is doing to replace features and primitives with OOPIF-compatible ones, this is introducing a new API that other teams (at least WebExt and DevTools, possibly others) need to build on top of.
Since we're working in parallel toward the same M6 goal, and since several of the things we need to build on top of this api are themselves non-trivial, I don't think it's reasonable for all of that to happen in the same milestone.
New APIs need to "bake" for some time before they could be reliable used. After landing, they need to be documented, learned, tried, used and misunderstood, crashes found and fixed -- which I don't think is possible in the span of a couple of months (as history has shown).
Comment 3•5 years ago
|
||
New APIs need to "bake" for some time before they could be reliable used. After landing, they need to be documented, learned, tried, used and misunderstood, crashes found and fixed -- which I don't think is possible in the span of a couple of months (as the history has shown).
*If left in M6, this all needs to happen after designing, writing, reviewing, testing and landing the API itself during the same milestone.
Comment 4•5 years ago
|
||
(In reply to :Tomislav Jovanovic :zombie from comment #2)
I believe this should be moved ahead to M5.
In that case, moving to M5.
Assignee | ||
Comment 5•5 years ago
|
||
I can take a look at this. What's the use case, exactly?
Reporter | ||
Comment 6•5 years ago
|
||
I'm not sure I understand why this is considered to block M5. My impression was that we weren't planning to add per-process JS actors until after Fission, and had no intention to make them block Fission. The existing per-process MessageManager system should work as-usual with Fission.
:zombie, why does this block the work you're doing?
Comment 7•5 years ago
|
||
Because we need to very thoroughly combine frame-level and process-level messaging in a lot of places in the webextensions framework, and for those two to be using similar yet different APIs with different capabilities and guarantees is gonna be messy, and require keeping around thousands of lines of (old, crufty, special-case) code to deal with message managers.
If there was a change of plans regarding M5, I didn't see that communicated anywhere.
And more generally, I don't understand the point of adding process level actors after fission is "complete". It seems unlikely people are gonna have the opportunity to go back just to "improve" things after they get it working once (code complexity and cruft be damned).
Overall, it seems like a very inefficient way to coordinate our work.
Comment 8•5 years ago
|
||
Tracking for Fission Nightly (M6). JSContentActors do not need to block the Fission dogfooding milestone (M5).
Comment 9•5 years ago
|
||
JSWindowActors, as currently implemented, are not a complete/finished fission-compatible replacement for all the functionality provided by the family of MessageManagers. Several aspects are still missing, and workarounds using process-level MessageManagers are somewhere between very inefficient and hard to impossible.
A few examples off the top of my head:
- Ability to send Queries in addition to one way messages
- Ability to efficiently broadcast the exact same message to the whole BrowsingContext subtree
- Ability to enumerate, identify and reference content processes from the parent
- Ability to link which processes a JSWindowActors belongs to, and vice versa
- A persistent top-level BC "id" (bug 1580766)
Though I'm sure there will be others to discover, since I didn't expect we'll need to make parts of the web extensions framework fission compatible without ProcessActors.
Updated•5 years ago
|
Comment 10•5 years ago
|
||
I'm working on bug 1316748, which should be least impacted by the above issues, and came across one more potential pitfall:
- message ordering between JSWindowActors and process level MessageManagers might not be guaranteed in all cases (specifically, for the in-parent documents, according to Nika)
Unfortunately, we still need to support GeckoView, which doesn't have support for out-of-process extensions, so all extensions pages run in the parent process on android.
Assignee | ||
Comment 11•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D64595
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D69784
Assignee | ||
Comment 14•5 years ago
•
|
||
Could we find a better name than JSContentActor{...}
? Semantically, Content
and Window
are near-synonyms.
Can we rename them JSProcessActor
, as someone suggested previously?
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 15•5 years ago
|
||
Depends on D69786
Assignee | ||
Comment 16•5 years ago
|
||
Depends on D69818
Assignee | ||
Comment 17•5 years ago
|
||
Assignee | ||
Comment 18•5 years ago
|
||
Depends on D70036
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 19•5 years ago
•
|
||
As per the vote, we're renaming them JSProcessActor
.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 20•5 years ago
|
||
This is a fixup to Bug 1580447, which landed some time ago.
Depends on D69819
Assignee | ||
Comment 21•5 years ago
|
||
Depends on D72758
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Comment 23•5 years ago
|
||
Backed out 9 changesets (Bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300162333&repo=autoland&lineNumber=35117
Assignee | ||
Comment 24•5 years ago
|
||
Merge error. Fixed, will reland once I've confirmed that the fix is sufficient.
Comment 25•5 years ago
|
||
Comment 26•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/68a900996016
https://hg.mozilla.org/mozilla-central/rev/b49b7bbd25b9
https://hg.mozilla.org/mozilla-central/rev/9c7322618b18
https://hg.mozilla.org/mozilla-central/rev/08f0ecf2f308
https://hg.mozilla.org/mozilla-central/rev/7e0c0eacd079
https://hg.mozilla.org/mozilla-central/rev/4de7ed8efac0
https://hg.mozilla.org/mozilla-central/rev/2ba000294288
https://hg.mozilla.org/mozilla-central/rev/e62bfdb50e18
https://hg.mozilla.org/mozilla-central/rev/c51bedeb809f
David, are you going to document that at https://firefox-source-docs.mozilla.org/dom/Fission.html?
Assignee | ||
Comment 28•5 years ago
|
||
Filed as bug 1635061. I think I'll wait a few days until I have a better idea of where bug 1633379 is heading, though.
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Description
•