Geckoview confuses libxul / gecko about whether multiprocess mode is on/available [browser.tabs.remote.autostart]
Categories
(GeckoView :: General, defect, P2)
Tracking
(firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: Gijs, Assigned: agi)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Broadly, libxul/gecko code uses 3 things to determine whether multiprocess/e10s is available and/or in use:
- are we in a non-parent/default process? If so, excellent, obviously we're in multiprocess mode
- does
BrowserTabsRemoteAutostart()
return true? - does
XRE_IsE10sParentProcess()
return true?
Both 2 and 3 (so basically, any determination about multiprocessing made in the parent/default process) are primarily informed by the browser.tabs.remote.autostart
pref, which is set to false in all.js
, and set to true in desktop's firefox.js
and then meddled with by a bunch of tests etc.
As best I can tell, this pref is always false in geckoview, and as a result, callers of either BrowserTabsRemoteAutostart()
or XRE_IsE10sParentProcess()
will believe we're in non-e10s mode.
In geckoview's androidtest
, whether we're using multiprocess mode is stored in https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/Environment.java#41-45
Geckoview's example code has https://searchfox.org/mozilla-central/source/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#147 . It's not clear to me if/how the two relate, and what the role of https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSessionSettings.java#290 is. From what I've seen in presentations, geckoview does not materially support not running in multiprocess mode.
None of the geckoview settings are used for any of the decisions made by libxul.
It's not 100% clear to me what the full list of consequences are. When changing just XRE_IsE10sParentProcess()
to return true on non-fennec android both generated a bunch of unexpected passes in web-platform tests, and crashes in geckoview-junit tests (apparently because we then try and start the networking socket process, which somehow makes the test unhappy - unsure why). I expect "fixing" BrowserTabsRemoteAutostart would generate even more improvements/challenges. :-)
I suspect addressing this will become more and more important and more and more gnarly as time goes on and geckoview's featureset expands. I think this needs the attention of someone who knows geckoview a lot better than me and can straighten out the relationship between geckoview's concept of multiprocess mode, and gecko's. I expect some of the callsites for the 2 utility functions may need auditing to ensure that we don't erroneously make assumptions that won't hold for geckoview/android.
Reporter | ||
Comment 1•5 years ago
|
||
(Apologies, meant to CC folks as I filed but I accidentally lost the CC field - please see comment #0. )
GeckoView supports e10s, and it is the default configuration. It is enabled (or disabled) on a per-session (tab) basis via GeckoSessionSettings
. This setting is used here[0] to determine remoteness and remote type of the <browser>
.
It does look like we want XRE_IsE10sParentProcess()
to return true
under GV. We probably just need to clean up the fallout from that (disable the socket process or fix it, etc).
Comment 3•5 years ago
|
||
James says we should probably fix this before e10s-multi.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5261ea86fa26 Set browser.tabs.remote.autostart to true everywhere. r=snorp
Comment 6•4 years ago
|
||
Backed out changeset 5261ea86fa26 (bug 1579440) for xpcshell failures at test_stickyprefs.js.
https://hg.mozilla.org/integration/autoland/rev/1c9b97bed37830e39642bfa7e73dbc2ea860662a
Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=285548471&repo=autoland&lineNumber=4665
Updated•4 years ago
|
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5ed6fc2b4997 Set browser.tabs.remote.autostart to true for geckoview. r=snorp
Comment 8•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Description
•