Improve asynchronicity of content process startup
Categories
(GeckoView :: Sandboxing, enhancement, P1)
Tracking
(firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
(Whiteboard: [geckoview:m1911] [geckoview:m1912][geckoview:m74])
Attachments
(4 files)
We need to hook up content process startup to route through the launcher thread. bholley wrote a POC patch, but it was a POC.
There's a bunch of synchronous stuff in GeckoProcessManager
that should be made more async.
Assignee | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Aaron says he will be working on this bug in November.
Assignee | ||
Comment 2•4 years ago
|
||
Note to self: as I do this, I need to be aware of exception handling and making sure that they are caught and routed through GeckoResult
.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Since XPCOMEventTarget
uses JNI, this patch makes it possible for consumers to
retrieve and invoke methods on one without needing to worry about whether JNI
is actually up yet.
To achieve this, we create the IXPCOMEventTarget
interface, and observe that
both of its methods can be handled by a proxy if JNI is not ready:
- Calls to
dispatch
may be enqueued until JNI is up; - Observe that, when JNI is not up yet, the result of
isOnCurrentThread
can never betrue
.
Once JNI is up and the event targets have been resolved, the proxies are
replaced with the real, concrete XPCOMEventTarget
s.
Assignee | ||
Comment 4•4 years ago
|
||
This patch adds a Dispatcher
implementation that allows us to create
GeckoResult
s that will dispatch to the XPCOM launcher thread.
Depends on D57837
Assignee | ||
Comment 5•4 years ago
|
||
The primary purpose of this patch is to convert the internal sequence of
service binding and invoking of start
to asynchronously run on the XPCOM
launcher thread via GeckoResult
. Because more of the code now runs on the same
thread, many of these methods no longer need to be synchronized
.
Disconnecting via unbind
is also modified to use the launcher thread and
GeckoResult
.
Note that no changes have been made yet to enable multiple processes of the
same type; those changes will be made in bug 1595834.
Depends on D57838
Assignee | ||
Comment 6•4 years ago
|
||
Now that everything in GeckoProcessManager
runs on the XPCOM launcher thread,
GeckoThread
should just call GeckoProcessManager.preload()
directly.
Depends on D57839
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b7ff66be3a86 Part 1 - Modify XPCOMEventTarget to accept method calls before JNI is ready; r=snorp https://hg.mozilla.org/integration/autoland/rev/9cc8d70c23bb Part 2 - Make GeckoResult compatible with XPCOMEventTarget; r=snorp https://hg.mozilla.org/integration/autoland/rev/a6554cbe8a2f Part 3 - Modify GeckoProcessManager to bind and start child processes asynchronously on the XPCOM launcher thread; r=geckoview-reviewers,agi https://hg.mozilla.org/integration/autoland/rev/5bf29e6ca1e8 Part 4 - Modify GeckoThread.preload to directly call into the process manager; r=geckoview-reviewers,snorp
Comment 8•4 years ago
|
||
Backed out for geckoview failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/a7091013d0879e555e138f7b99217ea21b4d35ad
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=284302017&repo=autoland&lineNumber=12397
Assignee | ||
Updated•4 years ago
|
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f6df46484dc Part 1 - Modify XPCOMEventTarget to accept method calls before JNI is ready; r=snorp https://hg.mozilla.org/integration/autoland/rev/de9a496180f9 Part 2 - Make GeckoResult compatible with XPCOMEventTarget; r=snorp https://hg.mozilla.org/integration/autoland/rev/d6d2afaee49d Part 3 - Modify GeckoProcessManager to bind and start child processes asynchronously on the XPCOM launcher thread; r=geckoview-reviewers,agi https://hg.mozilla.org/integration/autoland/rev/6fcef35f1cf4 Part 4 - Modify GeckoThread.preload to directly call into the process manager; r=geckoview-reviewers,snorp
Comment 10•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2f6df46484dc
https://hg.mozilla.org/mozilla-central/rev/de9a496180f9
https://hg.mozilla.org/mozilla-central/rev/d6d2afaee49d
https://hg.mozilla.org/mozilla-central/rev/6fcef35f1cf4
Comment 11•2 years ago
|
||
Moving content process management bugs to the new GeckoView::Sandboxing component.
Description
•