gecko/js/xpconnect/tests
Bobby Holley 65f180179d Bug 1034262 - Honor the wantXrays of both sides of the membrane when computing same-origin wrappers. r=gabor
The basic problem in the testcase is that one compartment requests same-origin
Xrays via wantXrays=true (the default for Sandboxes) while the other does not.
The current code only considers the wantXrays flag of the compartment performing
the access, so we end up in a situation where we have same-origin compartments,
but Xray in one direction and Transparent in the other.

This is a problem for crossCompartmentFunction.apply(null, [arg]). If both
globals get transparent wrappers, there's obviously no problem. And if both
globals get XrayWrappers, then the |apply| happens on the XrayWrapper of the
function in the caller's compartment. So the Array is unpacked in the caller's
compartment, and again we have no problem.

But if the caller gets Transparent and the callee gets Xrays, then we end up
invoking |apply| from the callee's side, which then gets an XrayWrapper to the
array. This XrayWrapper may do surprising things, leading to the odd situation
in the testcase.

Same-origin Xrays are kind of broken anyway, but I don't think we'll ever be
able to get rid of them. So the most sensible thing to do is probably to honor
the flag (if set) from either compartment. This patch does that.
2014-07-10 10:04:30 -07:00
..
browser Bug 987404 - Disable failing mochitest-browser tests in e10s. r=ted. 2014-04-02 10:53:55 +11:00
chrome Bug 1033927 - Drop support for custom [object XrayWrapper [object ClassName]] stringification. r=peterv 2014-07-07 13:11:24 -07:00
components Bug 1028588 - Fix dangerous public destructors in js/xpconnect - r=bholley 2014-06-23 14:49:08 -04:00
idl Bug 939044 - Rename remaining MODULE definitions to XPIDL_MODULE. r=mshal 2013-11-19 11:47:43 +09:00
mochitest Bug 1021258 - Restore the __proto__ mutation warning for __proto__ sets. r=luke 2014-06-06 12:21:36 +01:00
unit Bug 1034262 - Honor the wantXrays of both sides of the membrane when computing same-origin wrappers. r=gabor 2014-07-10 10:04:30 -07:00
Makefile.in Bug 942031 - Don't link against the js engine when there's no need to. r=mshal 2013-11-24 08:18:50 +09:00
moz.build Bug 990353 - Give tests/chrome its own moz.build file, like tests/mochitest. r=mshal 2014-04-22 14:08:28 -07:00