Closed
Bug 245544
Opened 22 years ago
Closed 17 years ago
nsBaseFilePicker::AppendFilters does not check for failure of getService
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: timeless, Assigned: timeless)
References
()
Details
(Keywords: crash)
Attachments
(1 file, 1 obsolete file)
|
835 bytes,
patch
|
neil
:
superreview+
|
Details | Diff | Splinter Review |
do_GetService can fail, when it does, you have a nice null pointer. when you use that null pointer, you
get a nice crash.
Comment 1•22 years ago
|
||
Testcase:
edit components/compreg.dat
look for a line like:
@mozilla.org/intl/stringbundle;1,{d85a17c1-aa7c-11d2-9b8c-00805f8a16d9}
remove it
save the file
make it readonly
run xpcshell
fp=Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
fp.appendFilters(1);
w/o the patch, you should crash
w/ the patch, you shouldn't :
js>
fp=Components.classes["@mozilla.org/filepicker;1"].createInstance(Components
.interfaces.nsIFilePicker);
[xpconnect wrapped nsIFilePicker @ 0x11efa58]
js> fp.appendFilters(1);
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
c:/Docume~1/cchantepie.INTRANET/mozilla/widget/src/xpwidgets/nsBaseFilePicker.cpp,
line 122
uncaught exception: [Exception... "Component returned failure code: 0x80040154
(NS_ERROR_FACTORY_NOT_REGISTERED) [nsIFilePicker.appendFilters]" nsresult:
"0x80
040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: typein ::
<TOP_LEVEL> :: line 2" data: no]
js> nsStringStats
=> mAllocCount: 1493
=> mReallocCount: 0
=> mFreeCount: 1423
=> mShareCount: 5345
=> mAdoptCount: 661
=> mAdoptFreeCount: 661
Attachment #150005 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•22 years ago
|
Attachment #150005 -
Flags: review?(neil.parkwaycc.co.uk) → review+
Comment 2•17 years ago
|
||
Get this one fixed, we shouldn't have more than a few thousand more...
Attachment #150005 -
Attachment is obsolete: true
Attachment #364846 -
Flags: superreview?(neil)
Updated•17 years ago
|
OS: Mac OS X → All
QA Contact: jrgmorrison → xptoolkit.widgets
Hardware: PowerPC → All
Whiteboard: [needs sr neil]
Target Milestone: --- → mozilla1.9.2a1
Updated•17 years ago
|
Attachment #364846 -
Flags: superreview?(neil) → superreview+
Updated•17 years ago
|
Whiteboard: [needs sr neil]
Comment 3•17 years ago
|
||
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•