Closed
Bug 475717
Opened 16 years ago
Closed 16 years ago
Disconnected document with title stays alive past cycle collection
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 488786
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(1 file)
96 bytes,
patch
|
Details | Diff | Splinter Review |
1 nsDocument::cycleCollection::Unlink(void*) (nsDocument.cpp:1857)
1 nsGenericHTMLElement::UnbindFromTree(int, int) (nsGenericHTMLElement.cpp:929)
1 nsGenericElement::UnbindFromTree(int, int) (nsGenericElement.cpp:2689)
1 nsGenericHTMLElement::UnbindFromTree(int, int) (nsGenericHTMLElement.cpp:929)
1 nsGenericElement::UnbindFromTree(int, int) (nsGenericElement.cpp:2689)
1 nsHTMLTitleElement::UnbindFromTree(int, int) (nsHTMLTitleElement.cpp:195)
1 nsHTMLTitleElement::SendTitleChangeEvent(int) (nsHTMLTitleElement.cpp:214)
1 nsDocument::NotifyPossibleTitleChange(int) (nsDocument.cpp:5036)
1 nsRunnableMethod<nsDocument>::nsRunnableMethod(nsDocument*, void (nsDocument::*)()) (libgklayout.dylib)
1 nsHTMLDocument::AddRef() (nsHTMLDocument.cpp:250)
1 nsDocument::AddRef() (nsDocument.cpp:1642)
Unlinking a document with a title element will actually add an additional reference to the document, because we post a runnable to notify about a title change. The document will be released when the runnable has run, but it seems wrong to post the runnable for a document that's not reachable by anything. We could bail if it doesn't have a presshell, but that doesn't seem like the right thing to do. Roc, thoughts?
Flags: wanted1.9.1?
How can we tell if it's not reachable by anything? Can we set a flag in Unlink to tell us that?
Assignee | ||
Comment 2•16 years ago
|
||
Usually we check for a member being null. I don't think there's anything in nsDocument that is null only when we unlinked. We could maybe check mExternalResourceMap.HaveShutDown()? Or add an unlinked flag.
Assignee | ||
Comment 3•16 years ago
|
||
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Comment on attachment 362611 [details] [diff] [review]
v1
Wow, if only all patches were this easy :)
Assignee | ||
Comment 5•16 years ago
|
||
:-/.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•16 years ago
|
Flags: wanted1.9.1?
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•