browser.docShellIsActive is false by default
Categories
(GeckoView :: General, defect, P2)
Tracking
(firefox85 fixed)
| Tracking | Status | |
|---|---|---|
| firefox85 | --- | fixed |
People
(Reporter: agi, Assigned: emilio)
References
Details
Attachments
(3 files)
Looks like docShellIsActive is false by default which breaks our expectation that sessions are active by default. We should try to fix this in docShell directly if we can.
| Reporter | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
| Reporter | ||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
| bugherder | ||
Comment 6•5 years ago
|
||
This is actually somewhat complicated, and a bit weird and buggy. A few notes:
- The flag in the parent process
mDocShellIsActiveis initialized tofalseinContentParent.cpp, which is wrong. The "real" initial state for a BrowsingContext/DocShell istrue
- to be even more correct it should probably just directly read and set the
BrowsingContext::{Get,Set}IsActivesynced field.
- The flag is set from the content process by sending a
BrowsingContext::SendSetDocShellIsActivemessage, and then the content process setting the flag on the BC.
- We should be directly setting it on the BC from the parent process, and not exposing the flag on BrowserParent or nsDocShell
- The actual side effects of setting
IsActiveare only occurring in the nsDocShell setter method, and aren't happening in a consistent way across all processes. This means that, e.g. after a process switch, the 3 different states (BrowserParent, BrowsingContext, and in-process state) don't necessarily match at all.
This entire setup probably needs to be reworked to instead work with isActive being set on a frame from the parent process, and the state being correctly set and the callbacks being correctly fired in every content process including after process switches.
ni? :emilio, as they've worked on issues like this one before.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 8•5 years ago
|
||
| Assignee | ||
Comment 9•5 years ago
|
||
And have it mirror in the parent process more automatically.
The docShellIsActive setter in the browser-custom-element side needs to
be there rather than in the usual DidSet() calls because the
AsyncTabSwitcher code relies on getting an exact amount of notifications
as response to that specific setter. Not pretty, but...
| Assignee | ||
Comment 10•5 years ago
|
||
Sorry I slacked a bit on this, I saw a lot of orange and I tried to fix the tab switcher in more elegant ways, oh well!
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
Updated•5 years ago
|
Description
•