[e10s] correctly maintain active state for remote docShells

RESOLVED FIXED in Firefox 30

Status

()

defect
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

(Blocks 1 bug)

Trunk
Firefox 30
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The non-remote browser binding has a .docShellIsActive property that silently fails when this.docShell is undefined. We should implement the same for the remote-browser binding to have background tabs de-prioritized.
Making remoteBrowser.docShellIsActive write-only makes it a little easier to implement. We would otherwise need to sync the active state with the tabParent whenever that changes. It is only ever written to in our current code, there are a few mochitests that read it but those can be rewritten in the future.
Attachment #8384228 - Flags: review?(wmccloskey)
Comment on attachment 8384228 [details] [diff] [review]
0001-Bug-978540-e10s-Correctly-maintain-active-state-for-.patch

Review of attachment 8384228 [details] [diff] [review]:
-----------------------------------------------------------------

Olli should review this since I'm not a DOM peer.
Attachment #8384228 - Flags: review?(wmccloskey) → review?(bugs)
Comment on attachment 8384228 [details] [diff] [review]
0001-Bug-978540-e10s-Correctly-maintain-active-state-for-.patch


>+++ b/dom/interfaces/base/nsITabParent.idl
>@@ -15,9 +15,11 @@ interface nsITabParent : nsISupports
>                         [array, size_is(count)] in uint32_t aRxs,
>                         [array, size_is(count)] in uint32_t aRys,
>                         [array, size_is(count)] in float aRotationAngles,
>                         [array, size_is(count)] in float aForces,
>                         in uint32_t count,
>                         in long aModifiers);
> 
>   readonly attribute boolean useAsyncPanZoom;
>+
>+  void setIsDocShellActive(in bool aIsActive);
update uuid of nsITabParent

>+bool
>+TabChild::RecvSetIsDocShellActive(const bool& aIsActive)
>+{
>+    nsCOMPtr<nsIDocShell> docShell = do_GetInterface(mWebNav);
>+    docShell->SetIsActive(aIsActive);
Null check docShell.

>+        <setter>
>+          <![CDATA[
>+            let {frameLoader} = this.QueryInterface(Ci.nsIFrameLoaderOwner);
uh, JS has some horrible looking syntax these days.
Attachment #8384228 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/fx-team/rev/2fc218e7ad72
Assignee: nobody → ttaubert
Whiteboard: [fixed-in-fx-team]
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/2fc218e7ad72
https://hg.mozilla.org/mozilla-central/rev/4201e638f683
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 30
QA Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.