Closed
Bug 688776
Opened 13 years ago
Closed 13 years ago
test_doublewrappedcompartments.xul relies on XHR event listener being an nsIDOMEventListener
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: khuey, Assigned: khuey)
References
Details
Attachments
(1 file)
2.37 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
test_doublewrappedcompartments.xul expects that if it sets and then retrieves the onreadystatechange event handler on an XHR object that it will receive a wrapped nsIDOMEventListener. After Bug 687332 this is no longer the case. I'm not really sure what do to with this one, since it's not clear to me what it's testing. Blake?
Comment 1•13 years ago
|
||
The test is making sure that if chrome JS gets its hands on a double wrapped JS object (that usually means a component implemented in JS that gets re-exposed to JS through XPConnect) and then passes that double-wrapped JS object to content, then content gets another double wrapped JS object instead of a security wrapper around chrome's double wrapped JS object. When I wrote this test (as well as a couple of the other tests that you've filed bugs on in the past week) the easiest way to get my hands on a double wrapped JS object was via event handlers. Is there a nicer way to get a double wrapped object?
Assignee | ||
Comment 2•13 years ago
|
||
So, this is all dark magic to me, but it's worth noting that I have to retrieve iter.filter in the content scope to get this test to pass. If I retrieve iter.filter in the chrome scope I get a standard double-wrapped object with no proxy. That may or may not be the expected behavior here ...
Comment 3•13 years ago
|
||
Comment on attachment 562554 [details] [diff] [review] Patch Yeah, this is fine. >+++ b/js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul >@@ -25,20 +25,20 @@ https://bugzilla.mozilla.org/show_bug.cg >- ok(unwrapped.testme(readystatechange), >+ ok(unwrapped.testme(filter), > 'content didn\'t get a proxy, but another double wrapped object'); While you're here, mind changing this to use double quotes around the outside to avoid having to escape the apostrophe in didn't? r=me either way.
Attachment #562554 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 4•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/60e2cfb98a52
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in
before you can comment on or make changes to this bug.
Description
•