Hold a weak reference to TabParent in nsDocShell

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P2
normal
RESOLVED FIXED
6 months ago
2 months ago

People

(Reporter: Nika, Assigned: Nika)

Tracking

(Regressed 1 bug)

unspecified
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

Currently the object is fetched by calling do_GetInterface on the tree root. Unfortunately, the tree root is nulled out when a DocShell's owning document is put into the BFCache, meaning that TabChild becomes inaccessible.

This patch changes DocShell to instead hold a nsWeakPtr reference to the TabChild which is used for GetTabChild rather than going through the tree root.
Nika, should this block bug 1469429?
Flags: needinfo?(nika)
Assignee

Comment 3

6 months ago
no, this is part of me trying to land my PWindowGlobal patches, so it should block those.
Blocks: 1487249
Flags: needinfo?(nika)

Comment 4

6 months ago
Pushed by nika@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/788d4d999843
Store a TabChild reference in cached docshells, r=bzbarsky, r=smaug

Comment 5

6 months ago
Pushed by nika@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc7076b4b610
Store a TabChild reference in cached docshells, r=bzbarsky, r=smaug

Comment 6

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/dc7076b4b610
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Regressions: 1541038
You need to log in before you can comment on or make changes to this bug.