Closed
Bug 318276
Opened 19 years ago
Closed 19 years ago
Crash [@ nsXULDocument::LoadOverlay ]
Categories
(Core :: XUL, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: Waldo, Assigned: Waldo)
References
()
Details
(4 keywords)
Crash Data
Attachments
(1 file, 1 obsolete file)
1.21 KB,
patch
|
Waldo
:
review+
Waldo
:
superreview+
dveditz
:
approval1.8.0.1+
dveditz
:
approval1.8.1+
|
Details | Diff | Splinter Review |
See testcase at URL and click the bottom button to get a crash; I'd attach it in the bug except that it would require two attachments instead of one.
Basically, when an overlay load fails, nsXULDocument::LoadOverlay tries to remove the observer it added to the observer hashtable earlier. The observer was only added if aObserver wasn't nsnull, but the observer is unconditionally removed if the overlay load fails. Consequently, if you set up a situation where the overlay load will fail (such as when the overlay isn't found or a security exception occurs [the latter demo'd in the testcase]) and pass in a null observer you'll get a crash.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #204531 -
Flags: superreview?
Attachment #204531 -
Flags: review?
Assignee | ||
Updated•19 years ago
|
Attachment #204531 -
Flags: superreview?(jst)
Attachment #204531 -
Flags: superreview?
Attachment #204531 -
Flags: review?(jst)
Attachment #204531 -
Flags: review?
I can confirm the crash.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051130 Firefox/1.5 ID:2005113004
Flags: blocking1.8.1?
Flags: blocking1.8.0.1?
Comment 3•19 years ago
|
||
Comment on attachment 204531 [details] [diff] [review]
Add a null-check
- if (NS_FAILED(rv))
- mOverlayLoadObservers.Remove(uri); // remove the observer if LoadOverlayInternal generated an error
+ if (aObserver && NS_FAILED(rv))
+ mOverlayLoadObservers.Remove(uri); // remove the observer if LoadOverlayInternal generated an error
Seems like the more correct fix here would be to check if mOverlayLoadObservers is initialized (i.e. if (NS_FAILED(rv) && mOverlayLoadObserver.IsInitialized()) before trying to remove from it, not whether the observer is null.
r+sr=jst with that change.
Attachment #204531 -
Flags: superreview?(jst)
Attachment #204531 -
Flags: superreview+
Attachment #204531 -
Flags: review?(jst)
Attachment #204531 -
Flags: review+
Assignee | ||
Comment 4•19 years ago
|
||
Attaching updated patch with reviews carried over...
Attachment #204531 -
Attachment is obsolete: true
Attachment #205660 -
Flags: superreview+
Attachment #205660 -
Flags: review+
Assignee | ||
Comment 5•19 years ago
|
||
Revised patch checked in on trunk by timeless:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsXULDocument.cpp&branch=&root=/cvsroot&subdir=mozilla/content/xul/document/src&command=DIFF_FRAMESET&rev1=1.682&rev2=1.683
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 205660 [details] [diff] [review]
Addresses comment
This patch has been baking on trunk a couple days; to the best of my knowledge it hasn't introduced any new bugs. (Indeed, given the extremely small amount of code changed and the way in which it was changed I would be highly surprised if one had been introduced.)
This is an obvious and simple patch to fix a crasher, so I think this should be in Firefox 1.5.0.1. Requesting approval...
Attachment #205660 -
Flags: approval1.8.0.1?
Comment 7•19 years ago
|
||
Let's bake a couple more days on the trunk and then consider for 1.8.0.1.
Comment 8•19 years ago
|
||
Comment on attachment 205660 [details] [diff] [review]
Addresses comment
a=dveditz for drivers.
Please land on both 1.8.0.1 and 1.8.1 branches, and add the appropriate "fixed" keywords when checked-in.
Attachment #205660 -
Flags: approval1.8.1+
Attachment #205660 -
Flags: approval1.8.0.1?
Attachment #205660 -
Flags: approval1.8.0.1+
Updated•19 years ago
|
Flags: blocking1.8.1?
Flags: blocking1.8.1+
Flags: blocking1.8.0.1?
Flags: blocking1.8.0.1+
Comment 9•19 years ago
|
||
1_8:
mozilla/content/xul/document/src/nsXULDocument.cpp; new revision: 1.664.2.6;
1_8_0:
mozilla/content/xul/document/src/nsXULDocument.cpp; new revision: 1.664.2.5.2.1;
Keywords: fixed1.8.0.1,
fixed1.8.1
Target Milestone: mozilla1.9alpha → mozilla1.8.1
Version: Trunk → 1.8 Branch
Comment 10•19 years ago
|
||
verified fixed on the branching using Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1. Clicking on the bottom button in the URL cited does not produce a crash.
Keywords: fixed1.8.0.1 → verified1.8.0.1
Comment 11•19 years ago
|
||
Verified FIXED using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060111 Firefox/1.5 and the testcase on Jeff's web site. (Also doesn't crash in a branch build from today.)
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Summary: Crash [ @ nsXULDocument::LoadOverlay ] → Crash [@ nsXULDocument::LoadOverlay ]
Updated•14 years ago
|
Crash Signature: [@ nsXULDocument::LoadOverlay ]
You need to log in
before you can comment on or make changes to this bug.
Description
•