mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 06:20:41 +00:00
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:
parent
aef20e4335
commit
b920af5de8
@ -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;
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user