Closed
Bug 1459698
Opened 7 years ago
Closed 5 years ago
Investigate if we could / should unlink the full stylesheet lists from {nsDocument,ShadowRoot} unlinking.
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla77
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: emilio, Assigned: nordzilla)
References
Details
Attachments
(1 file)
The current setup is that we only traverse the stylesheets, the stylesheets clear their JS wrapper and other bits, and we rely on no other cycles being present, instead of clearing the mStyleSheets / mServoStyles references.
It's not totally clear to me why this is the case, and apparently Olli wasn't very excited about this either.
It looks that it's been this way since bug 333078... So presumably there's no strong reason for this?
Reporter | ||
Updated•7 years ago
|
Flags: needinfo?(emilio)
Updated•7 years ago
|
Priority: -- → P3
Comment 1•7 years ago
|
||
There's all sorts of stuff that nsDocument traverses but doesn't unlink. See the comment at https://searchfox.org/mozilla-central/rev/5ff2d7683078c96e4b11b8a13674daded935aa44/dom/base/nsDocument.cpp#2061-2063 that used to be at the top of the unlink impl and now is buried somewhere in the middle...
Basically, I think Graydon was worried about the nsDocument destructor assuming that members are around in some indirect way.
That said, _if_ stylesheets have an unlink that breaks all outgoing references from them then this should not be a problem. Of course they might not do that.
Comment 2•7 years ago
|
||
Of course Graydon's comment is really old, predating strong parentNode edges and what not, and we in general have better understanding how CC works in Gecko.
Reporter | ||
Comment 3•7 years ago
|
||
Yeah, this is not a problem for now, let's punt on it unless it becomes one.
Flags: needinfo?(emilio)
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → enordin
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Attachment #9140273 -
Attachment description: Bug 1459698 - Unlink DocumentOrShadowRoot::mStyleSheets r=emilio,smaug → Bug 1459698 - Unlink DocumentOrShadowRoot::mStyleSheets r=emilio
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a5c41fc35b2
Unlink DocumentOrShadowRoot::mStyleSheets r=emilio
Comment 6•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox77:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in
before you can comment on or make changes to this bug.
Description
•