Closed Bug 462025 Opened 16 years ago Closed 16 years ago

Venkman crashes in nsDocAccessible::HasFlag

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

(Keywords: crash, regression)

Attachments

(1 file)

Attached patch Fix - v1Splinter Review
Regressed by bug 454997, I experience a crash when loading certain files in venkman. For example, opening calAlarm.js from the calendar project causes this crash.
Attachment #345135 - Flags: review?(aaronleventhal)
Attachment #345135 - Flags: review?(aaronleventhal) → review+
Comment on attachment 345135 [details] [diff] [review]
Fix - v1

Nit: please do the null check on |content| a line later instead.
Comment on attachment 345135 [details] [diff] [review]
Fix - v1


>     nsCOMPtr<nsIDOMElement> DOMElement =
>       nsCoreUtils::GetDOMElementFor(DOMDocument);
>+    // If this is not a HTML document, then DOMElement will be null.

this comment is wrong because DOMElement will document element if it's not HTML document. I would suggest it's possible to not have html:body for HTML document but I can't imagine when document element may be absent.
Pushed to mozilla-central: <http://hg.mozilla.org/mozilla-central/rev/d1604a838b2>

tag:         tip
user:        Philipp Kewisch <mozilla@kewis.ch>
date:        Wed Oct 29 09:43:21 2008 +0100
summary:     Fix bug 462025 - Venkman crashes in nsDocAccessible::HasFlag (regression). r=aaronlev
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Sorry, missed your comment before checking in :-( Would you suggest I change the comment to something more fitting, or fix the bug in a different way?
(In reply to comment #4)
> Sorry, missed your comment before checking in :-( Would you suggest I change
> the comment to something more fitting, or fix the bug in a different way?

yes, please change the comment. The bug fix looks good with me.
Additional changes checked in. After talking to aaronlev, I decided to just remove the comment, since its "only" a null check.

changeset:   21053:a62df7b5b9bb
tag:         tip
user:        Philipp Kewisch <mozilla@kewis.ch>
date:        Wed Oct 29 18:03:20 2008 +0100
summary:     Additional fix for bug 462025 as discussed with aaronlev,surkov
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: