Bug 921454 - Use background-finalize-ity forwarding for all wrappers, not just CCWs. r=jonco

The current setup allows mismatches for same compartment wrappers, which causes
us to assert when transplanting them.
This commit is contained in:
Bobby Holley 2013-10-04 13:29:36 +02:00
parent aef20e4335
commit b920af5de8
2 changed files with 3 additions and 3 deletions

View File

@ -174,7 +174,7 @@ CrossCompartmentWrapper::~CrossCompartmentWrapper()
{ {
} }
bool CrossCompartmentWrapper::finalizeInBackground(Value priv) bool Wrapper::finalizeInBackground(Value priv)
{ {
if (!priv.isObject()) if (!priv.isObject())
return true; return true;

View File

@ -66,6 +66,8 @@ class JS_FRIEND_API(Wrapper) : public DirectProxyHandler
virtual ~Wrapper(); virtual ~Wrapper();
virtual bool finalizeInBackground(Value priv) MOZ_OVERRIDE;
static Wrapper singleton; static Wrapper singleton;
static Wrapper singletonWithPrototype; static Wrapper singletonWithPrototype;
}; };
@ -78,8 +80,6 @@ class JS_FRIEND_API(CrossCompartmentWrapper) : public Wrapper
virtual ~CrossCompartmentWrapper(); virtual ~CrossCompartmentWrapper();
virtual bool finalizeInBackground(Value priv) MOZ_OVERRIDE;
/* ES5 Harmony fundamental wrapper traps. */ /* ES5 Harmony fundamental wrapper traps. */
virtual bool preventExtensions(JSContext *cx, HandleObject wrapper) MOZ_OVERRIDE; virtual bool preventExtensions(JSContext *cx, HandleObject wrapper) MOZ_OVERRIDE;
virtual bool getPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id, virtual bool getPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id,