gecko/js/xpconnect/wrappers
Bobby Holley 2c48de6a45 Bug 778409 - Enter the compartment of unwrappedProto rather than obj in Rewrap. r=gabor
This can happen if chrome sets its proto to a content object from a different scope
than the one doing the wrapping. In this case, the prototype chain looks like this:

chromeobj => CCW(examplecom_obj) => CCW(examplecom_scope.Object.prototype)

When wrapping chromeobj for exampleorg_scope, things will look like this:

COW(chromeobj) => CCW(examplecom_obj) => CCW(examplecom_scope.Object.prototype)

Note that we don't remap the proto of CCW(examplecom_scope) to
exampleorg_scope.Object.prototype, because the proto remapping only happens when
the object we're wrapping is chrome. There's no reason it has to be this way, but
even if we changed it we still wouldn't get the nice remapped lookup behavior to
exampleorg_scope.Object.prototype, because the proxy handler for CCW(examplecom_obj)
isn't a ChromeObjectWrapper, and thus doesn't know how to to the prototype bouncing
correctly.

Anyway, I suspect this case isn't worth worrying about as long as we don't crash.
2012-07-30 22:18:55 +02:00
..
AccessCheck.cpp Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
AccessCheck.h Bug 760109 - Introduce an explicit ChromeObjectWrapper. r=mrbkap 2012-07-27 12:15:46 +02:00
ChromeObjectWrapper.cpp Bug 760109 - Override traps in ChromeObjectWrapper to bounce lookups to the local prototype chain. r=mrbkap 2012-07-27 12:15:46 +02:00
ChromeObjectWrapper.h Bug 760109 - Override traps in ChromeObjectWrapper to bounce lookups to the local prototype chain. r=mrbkap 2012-07-27 12:15:46 +02:00
FilteringWrapper.cpp Bug 760109 - Introduce an explicit ChromeObjectWrapper. r=mrbkap 2012-07-27 12:15:46 +02:00
FilteringWrapper.h Bug 760109 - Introduce an explicit ChromeObjectWrapper. r=mrbkap 2012-07-27 12:15:46 +02:00
Makefile.in Bug 760109 - Introduce an explicit ChromeObjectWrapper. r=mrbkap 2012-07-27 12:15:46 +02:00
WaiveXrayWrapper.cpp Bug 771081 - part2: Rename CrossOriginWrapper files. r=gal 2012-07-16 19:22:51 +02:00
WaiveXrayWrapper.h Bug 771081 - part2: Rename CrossOriginWrapper files. r=gal 2012-07-16 19:22:51 +02:00
WrapperFactory.cpp Bug 778409 - Enter the compartment of unwrappedProto rather than obj in Rewrap. r=gabor 2012-07-30 22:18:55 +02:00
WrapperFactory.h Bug 773962 - Refactor Xray waiving logic to allow simple lookups in the waiver map without creating a waiver. r=mrbkap 2012-07-23 15:51:18 +02:00
XrayWrapper.cpp Merge the nullptr conversion from mozilla-central into mozilla-inbound 2012-07-30 10:28:15 -04:00
XrayWrapper.h Use HandleValue and MutableHandleValue in API hooks where possible, bug 776579. r=billm, sr=dmandelin 2012-07-30 05:19:09 -06:00