Closed Bug 326964 Opened 19 years ago Closed 19 years ago

###!!! ASSERTION: Invalid node type!: '(nodeType == nsIDOMNode::ELEMENT_NODE || nodeType == nsIDOMNode::TEXT_NODE || ... , file m:/mozilla/content/base/src/nsGenericElement.cpp, line 394

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: WeirdAl, Assigned: caillon)

Details

(Keywords: assertion, testcase)

Attachments

(3 files, 1 obsolete file)

I called on (DocumentType)->compareDocumentPosition(node), and hit this assertion.  Tracing the code onward, it's clear Mozilla does the right thing and returns the right value.  So for document type nodes, this assertion is bogus.

Testcase and patch coming up.
Attached file testcase (obsolete) —
Attached file fixed testcase
Sorry, the original test case had leftover debugging code in it and wouldn't return completely correct results.
Attachment #211670 - Attachment is obsolete: true
Reference attachment 211672 [details] for the testcase, and ignore the alert.  For x.compareDocumentPosition(y), x represents the row, and y represents the column.
Attached patch patchSplinter Review
Attachment #211673 - Flags: superreview?(bzbarsky)
Attachment #211673 - Flags: review?(bzbarsky)
Attachment #211673 - Flags: superreview?(bzbarsky)
Attachment #211673 - Flags: superreview+
Attachment #211673 - Flags: review?(bzbarsky)
Attachment #211673 - Flags: review+
checked in to trunk:
Checking in content/base/src/nsGenericElement.cpp;
/cvsroot/mozilla/content/base/src/nsGenericElement.cpp,v  <--  nsGenericElement.cpp
new revision: 3.447; previous revision: 3.446
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Component: DOM: Core → DOM: Core & HTML
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: