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)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: dbaron, Assigned: mozeditor)
Details
(Keywords: crash, Whiteboard: [nsbeta2+] (fix in hand))
Attachments
(1 file)
|
305 bytes,
text/html
|
Details |
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
| Reporter | ||
Comment 1•26 years ago
|
||
Comment 2•26 years ago
|
||
Passing along to Joe Francis - the owner of the Range implementation.
Assignee: vidur → jfrancis
Comment 3•26 years ago
|
||
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
| Reporter | ||
Comment 4•26 years ago
|
||
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
Comment 11•26 years ago
|
||
[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)
| Assignee | ||
Comment 13•26 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Updated•25 years ago
|
Component: DOM Level 2 → DOM Traversal-Range
Updated•13 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•