Closed Bug 688776 Opened 9 years ago Closed 9 years ago
_doublewrappedcompartments .xul relies on XHR event listener being an ns IDOMEvent Listener
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?
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?
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 ...
Assignee: nobody → khuey
Status: NEW → ASSIGNED
Attachment #562554 - Flags: review?(mrbkap)
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+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.