Closed Bug 1511237 Opened 2 years ago Closed 2 years ago

Hold a weak reference to TabParent in nsDocShell

Categories

(Core :: DOM: Navigation, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(1 file)

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)
no, this is part of me trying to land my PWindowGlobal patches, so it should block those.
Blocks: 1487249
Flags: needinfo?(nika)
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
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
https://hg.mozilla.org/mozilla-central/rev/dc7076b4b610
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Regressions: 1541038
You need to log in before you can comment on or make changes to this bug.