Open
Bug 325707
Opened 20 years ago
Updated 3 years ago
Typeof on broken XPCOM constructor doesn't return anything
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
NEW
People
(Reporter: WeirdAl, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
4.57 KB,
application/javascript
|
Details |
I have written a fake XMLSerializer constructor component in JavaScript, which itself is currently broken. After adding it to my build, I tried running the URL:
javascript:alert(typeof JSXMLSerializer)
Expected result:
A dialog saying "undefined".
Actual result:
No dialog, and an error message in the JS console:
Error: [Exception... "'Component does not have requested interface' when calling method: [nsIFactory::createInstance]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: javascript:alert(typeof JSXMLSerializer) :: <TOP_LEVEL> :: line 1" data: no]
Source File: javascript:alert(typeof JSXMLSerializer)
Line: 1
Testcase and steps to reproduce coming right up.
| Reporter | ||
Comment 1•20 years ago
|
||
Steps to reproduce:
(1) Drop the attached JSXMLSerializer file into dist/bin/components.
(2) Restart Mozilla.
(3) In the browser, type the URL javascript:alert(typeof JSXMLSerializer).
This bug isn't about the component being broken, by the way; it's about the failure of the typeof operator to compensate and return undefined.
Comment 2•20 years ago
|
||
You've registered a name through DOM class info and not implemented the needed interfaces (because you can't in JS), so nsWindowSH::GlobalResolve probably barfs because it can't get the interface it needs (nsIDOMCIExtension).
Personally I think this bug is invalid and we should throw, you didn't fulfill the contract that's expected when registering your component in the "JavaScript DOM class" category. Not throwing will just make it harder to debug your component.
Assignee: dbradley → general
Component: XPConnect → DOM
QA Contact: pschwartau → ian
Updated•16 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Comment 3•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•