Closed
Bug 173350
Opened 22 years ago
Closed 22 years ago
nsIDOMTreeWalker crashes with XUL documents
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.2beta
People
(Reporter: aaronlev, Assigned: aaronlev)
References
Details
Attachments
(1 file, 2 obsolete files)
1.26 KB,
patch
|
jst
:
review+
bzbarsky
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
I believe it is crashing because it is getting an incorrect result from IndexOF(). The IndexOf() function calls nsXULDocument::IndexOF() which is not implemented, and has the NS_NOTREACHED assertion. Eventually this causes nsTreeWalker::TestNode() to crash because it has a null pointer for the node.
nice! will be an easy fix, hrm.. why is there no 1.2 final target?
Assignee: anthonyd → bugmail
Target Milestone: --- → mozilla1.2beta
Assignee | ||
Comment 2•22 years ago
|
||
This is blocking my fix for bug 161410. There are a lot of NS_NOT_IMPLEMENTED methods in nsXULDocument. Shouldn't we fix all of them at once? At least, if there is a pure out param, we should zero it out.
Blocks: 161410
Assignee | ||
Comment 3•22 years ago
|
||
Hmm, I have fixes cloggin up my tree waiting for this. Sicking, do you want me to take it?
Assignee | ||
Comment 4•22 years ago
|
||
I think we'll get this fixed for free when bug 124412 is fixed, because we'll inherit an IndexOf() impl from nsDocument.
Assignee | ||
Comment 6•22 years ago
|
||
Seeking r=sicking, sr=jst or bz
![]() |
||
Comment 7•22 years ago
|
||
+ NS_IF_ADDREF(aResult = mRootContent); + return NS_OK; Should this throw if mRootContent is null? + aIndex = (aPossibleChild == mRootContent)? 0 : -1; What if aPossibleChild == mRootContent == nsnull? + aCount = 1; What if mRootContent is null? If mRootContent is never null, why not just use NS_ADDREF?
![]() |
||
Comment 9•22 years ago
|
||
That addressed concerns 1 and 4 out of 4... returning "1" for the count when we have no kids seems wrong. IndexOf(nsnull) returning "0" seems wrong.
Assignee | ||
Comment 10•22 years ago
|
||
Attachment #104446 -
Attachment is obsolete: true
![]() |
||
Comment 11•22 years ago
|
||
Comment on attachment 104447 [details] [diff] [review] Sorry bz, here you go. much better. ;)
Attachment #104447 -
Flags: superreview+
Comment 12•22 years ago
|
||
Comment on attachment 104447 [details] [diff] [review] Sorry bz, here you go. r/sr=jst
Attachment #104447 -
Flags: review+
Assignee | ||
Comment 13•22 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 14•22 years ago
|
||
Comment on attachment 104447 [details] [diff] [review] Sorry bz, here you go. a=asa for checkin to the 1.2 branch (on behalf of drivers)
Attachment #104447 -
Flags: approval+
Assignee | ||
Comment 15•22 years ago
|
||
Checked into 1.2 branch.
Updated•11 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
•