Closed
Bug 327891
Opened 20 years ago
Closed 18 years ago
ASSERTION: object instantiated without constructor
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jruderman, Unassigned)
Details
(Keywords: assertion, testcase)
Steps to reproduce:
1. javascript:new HTMLDocument();
Result:
###!!! ASSERTION: object instantiated without constructor: 'Error', file /Users/admin/trunk/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 4658
I ran into this while trying to make a list of global constructors and things (such as new Image and new XMLHttpRequest) for bug 326633. Those things don't show up in "for (p in window)" for some reason. I guess HTMLDocument isn't intended to be a constructor, and might not be useful for anything other than instanceof.
| Reporter | ||
Comment 1•18 years ago
|
||
WFM. Now I just get:
JavaScript error: , line 0: uncaught exception: [Exception... "Cannot convert WrappedNative to function" nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" location: "JS frame :: javascript:new%20HTMLDocument();%20void%200 :: <TOP_LEVEL> :: line 1" data: no]
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 2•18 years ago
|
||
I checked in a mochitest that just makes sure that "new HTMLDocument()" throws (and doesn't assert).
Flags: in-testsuite+
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•