Closed Bug 699807 Opened 8 years ago Closed 8 years ago

Don't create runnables for setting the title on unlinked documents

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file)

Attached patch v1Splinter Review
When we unlink a title element we unbind it, which tries to change the title of its document. But because we're unlinking, the document might have been unlinked already. Changing the title post a runnable that holds the document. We shouldn't really be touching unlinked documents.
Attachment #571980 - Flags: review?(jst)
Comment on attachment 571980 [details] [diff] [review]
v1


> nsDocument::NotifyPossibleTitleChange(bool aBoundTitleElement)
> {
>+  NS_ASSERTION(!mInUnlinkOrDeletion || !aBoundTitleElement,
>+               "Setting a title while unlinking or destroying the element?");
>+  if (mInUnlinkOrDeletion)
>+    return;
>+
if (expr) {
  stmt;
}
Attachment #571980 - Flags: review?(jst) → review+
https://hg.mozilla.org/mozilla-central/rev/8041a57029dc
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Blocks: 701342
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.