e10s should call SetIsActive() on its nsIWebBrowser

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
8 years ago
5 years ago

People

(Reporter: bholley, Assigned: mconley)

Tracking

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(e10s+)

Details

(Whiteboard: [fixed by bug 978540])

(Reporter)

Description

8 years ago
In bug 343515, I added support for telling docshells when they're active (in Firefox, this corresponds to being the foremost tab). We're going to start using this for optimizations like image discarding and refresh driver throttling.

I added the API to nsIWebBrowser, but it currently has no consumers, so in theory it might not work. It would be good to add some sort of test similar to those from bug 343515 to make sure it does.

Any e10s release branched off mozilla-central at a changeset later than the one where bug 512260 lands should almost certainly block on this bug, since otherwise memory usage will go through the roof when we disable discarding on every image ever.

The tests from bug 343515 will probably also fail on e10s until this is fixed (though I'm not sure whether e10s even runs browser tests?)

I also filed bug 585771 on fennec.

Updated

8 years ago
Component: IPC → Document Navigation
QA Contact: ipc → docshell
tracking-e10s: --- → +
Assignee: nobody → felipc
Blocks: 997456
Some of this might have been fixed in bug 978540 and the other part might be in bug 972341.
(Assignee)

Comment 2

5 years ago
Tentatively stealing this from Felipe, unless he has any objections.
Assignee: felipc → mconley
(Assignee)

Comment 3

5 years ago
So I attached gdb to the content process, and set a breakpoint at nsDocShell::SetIsActive.

With an e10s window, I can see nsDocShell::SetIsActive being called with true when a page is loaded. I can see it being set to false when I switch to a different tab, and then true again - I assume what's happening is that "false" is being set on the docshell of the switched-from tab, and "true" is being set on the docshell of the switched-to tab.

So is there any more to do here? Are there other cases I'm not seeing? (needinfo'ing ttaubert, since it sounds like he's worked on this stuff before).
Flags: needinfo?(ttaubert)
Looking at bug 585771 (the Android equivalent) I think this is indeed all done. I fixed that in bug 978540.
Flags: needinfo?(ttaubert)
(Assignee)

Comment 5

5 years ago
Excellent! Thanks ttaubert.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Depends on: 978540
Resolution: --- → WORKSFORME
Whiteboard: [fixed by bug 978540]
You need to log in before you can comment on or make changes to this bug.