Closed Bug 1396568 Opened 7 years ago Closed 7 years ago

Make DocumentFragment::mHost strong reference

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Attached patch strong_host.diffSplinter Review
This is a wchen's patch, with QI macro usage fixed and switched to use Element and not nsIContent.

remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=31b89a1fef475815522d5de79fcb6a9e2ec2b71c
Attachment #8904247 - Flags: review?(mrbkap)
Comment on attachment 8904247 [details] [diff] [review]
strong_host.diff

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

This looks fine to me but would you mind mentioning here what the motivation for this is?
Attachment #8904247 - Flags: review?(mrbkap) → review+
ShadowRoot (which inherits DocumentFragment), should keep its host alive. Otherwise we expose our GC handling to the web, and shadowroot.host may suddenly become null if host isn't kept alive by anything else.
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cdbce427f71c
Make DocumentFragment::mHost a strong reference (so that ShadowRoot.host doesn't become null), r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/cdbce427f71c
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
No longer blocks: shadowdom-initial-release
You need to log in before you can comment on or make changes to this bug.