Closed Bug 564114 Opened 15 years ago Closed 14 years ago

Crash [@ nsINode::CompareDocumentPosition] passing null

Categories

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

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5
Tracking Status
blocking2.0 --- beta2+

People

(Reporter: jruderman, Assigned: peterv)

References

Details

(4 keywords)

Crash Data

Attachments

(2 files)

No description provided.
Before the crash: ###!!! ASSERTION: don't pass null: 'aOtherNode', file /Users/jruderman/central/content/base/src/nsGenericElement.cpp, line 662
Keywords: assertion
blocking2.0: --- → ?
We used to throw NS_ERROR_INVALID_ARG for compareDocumentPosition(null). WebKit returns DOCUMENT_POSITION_DISCONNECTED. Should I just keep throwing NS_ERROR_INVALID_ARG?
Assignee: nobody → peterv
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → mozilla1.9.3a5
(The spec doesn't mention this case at all)
I say throwing makes more sense. Similar to appendChild(nsnull)
Attached patch v1 (deleted) — Splinter Review
Turns out I added a helper function on nsINode that checks for null arg, but forgot to switch the two callers to it (quickstubs and nsNode3Tearoff::CompareDocumentPosition).
Attachment #443894 - Flags: review?(bzbarsky)
Comment on attachment 443894 [details] [diff] [review] v1 r=bzbarsky
Attachment #443894 - Flags: review?(bzbarsky) → review+
blocking2.0: ? → beta1+
blocking2.0: beta1+ → beta2+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Crash Signature: [@ nsINode::CompareDocumentPosition]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: