gecko/js/xpconnect
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
..
crashtests Bug 776333 - Morph slim wrappers in LookupMethod. r=mrbkap 2012-07-25 18:17:40 +02:00
idl Bug 773962 - Introduce Cu.recomputeWrappers. r=mrbkap 2012-07-23 15:51:18 +02:00
loader Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
public Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
shell Merge the nullptr conversion from mozilla-central into mozilla-inbound 2012-07-30 10:28:15 -04:00
src Bug 777292 - Convert incorrect conversions to nsresult and fix named constants; r=ehsan 2012-07-27 16:59:29 +03:00
tests Bug 778409 - Enter the compartment of unwrappedProto rather than obj in Rewrap. r=gabor 2012-07-30 22:18:55 +02:00
wrappers Bug 778409 - Enter the compartment of unwrappedProto rather than obj in Rewrap. r=gabor 2012-07-30 22:18:55 +02:00
Makefile.in Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00