Open Bug 1441322 Opened 3 years ago Updated 3 years ago

Maybe try to kill nsDocument::Destroy completely again.

Categories

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

enhancement

Tracking

()

People

(Reporter: emilio, Unassigned)

References

Details

I somehow stumbled across this today, and maybe 11 years later CC is fast enough for us to be able to do this...
Flags: needinfo?(emilio)
I could misremember, but did peterv do something around nsDocument::Destroy recenty-ish.

In practice I think we rely on DestroyContent() quite a bit.
I don't think I did. IIRC the problem with Destroy(Content) hasn't been how fast the CC is, but more incomplete graphs causing us to either leak or need multiple collections to collect certain cycles that would be cleaned up immediately by calling Destroy(Content).
I see, that makes sense.

I think we should avoid running that when the document still has a PresShell though, I don't think https://searchfox.org/mozilla-central/rev/b469db5c90d618f4b202d5ef280e1a78224eb43b/dom/base/FragmentOrElement.cpp#1297 is sound otherwise. Will file another bug for that. I think that mostly holds right now, at least in debug builds with assertions I don't see them fire... But I'll file a different bug for that.
Flags: needinfo?(emilio)
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.