Closed
Bug 875198
Opened 11 years ago
Closed 10 years ago
|crossOriginWindow instanceof Window| should work
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 789261
People
(Reporter: bholley, Unassigned)
References
Details
Per spec, I don't see any reason why this wouldn't, but it doesn't work at all with our architecture. I initially thought we could just munge the security policy on XOWs to allows hasInstance, but then I realized that we don't ever hit the proxy hasInstance hook never gets called, because the constructor itself is not cross-origin (just the object under test). I need to think about how to fix this.
Reporter | ||
Comment 1•11 years ago
|
||
Note: I have ready-made todo test coverage for this in js/xpconnect/tests/mochitest/test_bug870423.html
Comment 2•11 years ago
|
||
Given the description, this should work for WebIDL binding objects, since InterfaceHasInstance does: 1668 const DOMClass* domClass = GetDOMClass(js::UncheckedUnwrap(instance)); the only issue is that Window and Location (which are the only cross-origin-accessible objects) are not WebIDL objects yet, right?
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #2) > Given the description, this should work for WebIDL binding objects, since > InterfaceHasInstance does: > > 1668 const DOMClass* domClass = > GetDOMClass(js::UncheckedUnwrap(instance)); > > the only issue is that Window and Location (which are the only > cross-origin-accessible objects) are not WebIDL objects yet, right? Oh, nice. Marking the deps. Once that lands, all we should need to do is flip the todo on comment 1.
Comment 4•10 years ago
|
||
Both todos in test_bug870423.html are fixed, so this should be done?
Reporter | ||
Comment 5•10 years ago
|
||
Yep!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•