Closed Bug 8017 Opened 25 years ago Closed 25 years ago

Missing .xpt file causes crash

Categories

(Core :: XPConnect, defect, P3)

All
Mac System 8.5
defect

Tracking

()

VERIFIED FIXED

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.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
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!
Target Milestone: M7
Simon Fraser, could you please verify this ?
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.
I'll try that. Thank you.
QA Contact: desale → phillip
Status: RESOLVED → VERIFIED
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.