Closed
Bug 8017
Opened 25 years ago
Closed 25 years ago
Missing .xpt file causes crash
Categories
(Core :: XPConnect, defect, P3)
Tracking
()
VERIFIED
FIXED
M7
People
(Reporter: sfraser_bugs, Assigned: jband_mozilla)
Details
Doing a QI in JS to an interface for which the .xpt file is missing, e.g.
var editorShell = Components.classes["component://netscape/editor/
editorshell"].createInstance();
editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell);
where nsIEditorShell is in editor.xpt which is missing,
causes a crash. QI gets called on the implementation, with a nil IID reference.
Passing nil references around is bad, and causes an attempt to read an IID
from *nil.
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•25 years ago
|
||
Checked in a fix. This was a more general problem... A null or void on the JS
side was getting converted into a NULL on the native side. This is
usually the right thing to do. But when the xpidl param type for the value is
declared as [ref] (which maps to a C++ reference) this is very bad. Now the code
checks for this case and throws a JS exception with a nice message when this
happens.
Thanks for finding this!
Comment 2•25 years ago
|
||
Simon Fraser, could you please verify this ?
Reporter | ||
Comment 3•25 years ago
|
||
This can be verified by QA. On linux, delete editor.xpt from the components
directory. Now choose 'Editor' from the tasks menu. If you should not dump
core.
Comment 4•25 years ago
|
||
I'll try that. Thank you.
Updated•25 years ago
|
QA Contact: desale → phillip
verified on
1999-06-17-08 RedHat Linux 5.2 kernel 2.2.7
1999-06-17-08 WinNT 4.0 sp4
1999-06-17-08 MacOS 8.51
You need to log in
before you can comment on or make changes to this bug.
Description
•