Closed Bug 29329 Opened 26 years ago Closed 26 years ago

DOM Range crash - set(Start|End)(Before|After) given node with null parent

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: mozeditor)

Details

(Keywords: crash, Whiteboard: [nsbeta2+] (fix in hand))

Attachments

(1 file)

DESCRIPTION: I crash in Range::SetStartBefore() if I give it a node whose parentNode is null. I think the fix to this bug may be to change these four functions to get the parent before calling IndexOf(), and throw an exception if the parent is null. But you may want to have a null check in IndexOf() also. STEPS TO REPRODUCE: * load attached test case ACTUAL RESULTS: * crash in nsRange::IndexOf(), when dereferencing the pointer to the parent node. EXPECTED RESULTS: * no crash DOES NOT WORK CORRECTLY ON: * Linux, mozilla, 2000-02-24-15-M14 ADDITIONAL INFORMATION: I posted a message to www-dom about which exception should be thrown (and whether it should be thrown): http://lists.w3.org/Archives/Public/www-dom/2000JanMar/0107.html
Severity: normal → critical
Keywords: crash
Passing along to Joe Francis - the owner of the Range implementation.
Assignee: vidur → jfrancis
Vidur--I assume that this isn't something we would want to fix immediately; please let me know if you feel otherwise.
Target Milestone: M15
The DOM2 spec has been slightly revised to note exceptions based on refNode's ancestors: http://www.w3.org/TR/DOM-Level-2/range.html#Level-2-Range-idl
accepting....
Status: NEW → ASSIGNED
moving this to M16
Target Milestone: M15 → M16
bumping up priority on this one
Priority: P3 → P1
Keywords: crash
Adding crash keyword
Keywords: crash
m17
Target Milestone: M16 → M17
i have fix in hand
Whiteboard: (fix in hand)
[nsbeta2+] Would like to have this fix. Not sure how easily a user encounters the crash, but if the bug stays open a long time, we will ask about that as a cut criteria.
Keywords: nsbeta2
Whiteboard: (fix in hand) → [nsbeta2+] (fix in hand)
m16
Target Milestone: M17 → M16
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updating QA Contact.
QA Contact: vidur → desale
Verified with 2000-06-01-08.
Status: RESOLVED → VERIFIED
Component: DOM Level 2 → DOM Traversal-Range
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: