Last Comment Bug 699807 - Don't create runnables for setting the title on unlinked documents
: Don't create runnables for setting the title on unlinked documents
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: Peter Van der Beken [:peterv]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 637099 701342
  Show dependency treegraph
 
Reported: 2011-11-04 08:11 PDT by Peter Van der Beken [:peterv]
Modified: 2011-11-10 05:02 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (982 bytes, patch)
2011-11-04 08:11 PDT, Peter Van der Beken [:peterv]
bugs: review+
Details | Diff | Splinter Review

Description Peter Van der Beken [:peterv] 2011-11-04 08:11:44 PDT
Created attachment 571980 [details] [diff] [review]
v1

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.
Comment 1 Olli Pettay [:smaug] 2011-11-04 10:07:06 PDT
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;
}
Comment 2 Peter Van der Beken [:peterv] 2011-11-07 09:20:59 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/8041a57029dc
Comment 3 Ed Morley [:emorley] 2011-11-07 17:26:21 PST
https://hg.mozilla.org/mozilla-central/rev/8041a57029dc

Note You need to log in before you can comment on or make changes to this bug.