Closed
Bug 819253
Opened 12 years ago
Closed 11 years ago
The instanceof operator and QueryInterface should be consistent about new-binding objects not having classinfo
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: emk, Unassigned)
References
Details
Otherwise |new Foo() instanceof Ci.nsIFoo| will fail while |new Foo().QueryInterface(Ci.nsIFoo)| succeeds.
Reporter | ||
Comment 1•12 years ago
|
||
QueryInterface seems to be telling a lie about whatever IIDs other than nsIClassInfo.
https://mxr.mozilla.org/mozilla-central/source/dom/bindings/BindingUtils.cpp?rev=3db4085a10b2#549
Comment 2•12 years ago
|
||
Yeah, we sort of hacked in QueryInterface initially... Maybe we need to sort this out better. Ideally, we'd stop exposing QueryInterface on WebIDL objects altogether; the worry is backwards compat issues.
Reporter | ||
Comment 3•12 years ago
|
||
Then regarding bug 818281, should I update the broken tests instead of depending on another hack?
Summary: nsJSIID::HasInstance should handle new-binding objects without classinfo → The instanceof operator and QueryInterface should be consistent about new-binding objects not having classinfo
Comment 4•12 years ago
|
||
Yes, I think that would be preferable... One thing to watch out for here, though, is extension compat issues. :(
Reporter | ||
Comment 5•11 years ago
|
||
This change was unnecessary.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•