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 a109514dc7
commit b8590ccaf5
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())
return true;

View File

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