Closed
Bug 558973
Opened 14 years ago
Closed 14 years ago
"ASSERTION: Nodes that are not documents, document fragments or elements can't be parents!"
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: jruderman, Assigned: peterv)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
136 bytes,
text/html
|
Details | |
7.33 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: Nodes that are not documents, document fragments or elements can't be parents!: 'aParent->IsNodeOfType(nsINode::eDOCUMENT) || aParent->IsNodeOfType(nsINode::eDOCUMENT_FRAGMENT) || aParent->IsNodeOfType(nsINode::eELEMENT)', file /Users/jruderman/mozilla-central/content/base/src/nsGenericElement.cpp, line 3574 This assertion was added in bug 540848 and is very easy to trigger. There are already a bunch of mochitests (at least in part 2/5) that trigger this assertion, but assertions aren't fatal yet on Tinderbox :/
Flags: in-testsuite+
Updated•14 years ago
|
blocking2.0: --- → ?
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → peterv
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → mozilla1.9.3a5
Assignee | ||
Comment 1•14 years ago
|
||
Apparently the DOM testsuite doesn't test this :-/. I don't like adding those (virtual) IsNodeOfType calls, but don't have a better idea.
Attachment #438749 -
Flags: review?(jst)
Comment 2•14 years ago
|
||
Do we have spare bits in nsINode? One could be used for "DO_NOT_ALLOW_ADDING_CHILD_NODES" or some such. Though, I'm not sure if GetFlags is much faster than IsNodeOfType
![]() |
||
Comment 3•14 years ago
|
||
So wait. Why do we need to call the generic methods from nsGenericDOMDataNode and add checks to them? Because quickstubs calls those methods directly?
![]() |
||
Comment 4•14 years ago
|
||
And we do want to make flag-getting fast (just have them as bitfield members?) and replace some of our IsNodeOfType with flag bits, imo. But that's a separate bug.
Updated•14 years ago
|
Attachment #438749 -
Flags: review?(jst) → review+
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #3) > Why do we need to call the generic methods from nsGenericDOMDataNode Technically we don't, but I personally like it better if all entry points end up running the same code. > and add checks to them? Quickstubs call the generic nsINode methods (through the inlined nsINode::InsertBefore/ReplaceChild/AppendChild). We could make the nsINode functions virtual and override them in nsGenericDOMDataNode if you like that better. That would remove one virtual function call overall for ReplaceOrInsertBefore (-2+1). I think we need faster checks for nodetype, so that we can actually completely remove those virtual function calls (-2+0).
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1e70c342a6cc
![]() |
||
Comment 7•14 years ago
|
||
> I think we need faster checks for nodetype,
I'm adding a faster IsElement() right now; we can add others similarly as needed.
Updated•14 years ago
|
blocking2.0: ? → final+
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•