Closed
Bug 58477
Opened 24 years ago
Closed 23 years ago
GetRootContent and GetDocumentElement callers must null-check
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: dbaron, Assigned: dr)
Details
(Keywords: dom1)
Attachments
(4 files)
3.70 KB,
patch
|
Details | Diff | Splinter Review | |
3.69 KB,
patch
|
Details | Diff | Splinter Review | |
1.61 KB,
patch
|
Details | Diff | Splinter Review | |
1.57 KB,
patch
|
Details | Diff | Splinter Review |
As vidur pointed out in bug 40121, we need to make sure that all callers of nsIDocument::GetRootContent and nsIDOMDocument::GetDocumentElement check for null, since these functions may return null in rare cases.
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Comment 3•24 years ago
|
||
Looks good. r=blake
Comment 4•24 years ago
|
||
Thenks for the reviews (blake and scc), now there's only one place remaining that needs to deal with null root element cases (possibly), that's at http://lxr.mozilla.org/seamonkey/source/layout/xbl/src/nsXBLWindowHandler.cpp#193 so I'll let hyatt deal with that.
Assignee: jst → hyatt
OS: Linux → All
Hardware: PC → All
this fixes this instance (looking for r=, etc...) but there are other places in the code where these functions aren't null-checked (nsHTMLEditor.cpp and nsXULElement.cpp to name a couple). i'll check this in asap and then throw this back at jst, since he seemed to know something about which calls should and shouldn't need null-checking.
Updated•23 years ago
|
Component: DOM Level 1 → DOM Core
Comment 10•23 years ago
|
||
r=jag
Assignee | ||
Comment 11•23 years ago
|
||
sr=hyatt. i'll check in when the tree opens.
Assignee | ||
Comment 12•23 years ago
|
||
checked in (cvs rev 1.5). jst, i'm marking this as fixed -- could you verify, if there are indeed no more cases where this needs to be null-checked? i noticed some calls in nsHTMLEditor.cpp, nsXULElement.cpp, but it sounded like you knew something about those cases... thanks!
Comment 15•23 years ago
|
||
johnny can u please verify this bug...
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•