зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1034239 - Add Proxies to ForceCOWBehavior. r=gabor
This commit is contained in:
Родитель
67c77aebbd
Коммит
bba8240dd7
|
@ -121,9 +121,8 @@ WrapperFactory::DoubleWrap(JSContext *cx, HandleObject obj, unsigned flags)
|
|||
}
|
||||
|
||||
// In general, we're trying to deprecate COWs incrementally as we introduce
|
||||
// Xrays to the corresponding object types. But switching off COWs for Object
|
||||
// and Array instances would be too tumultuous at present, so we punt on that
|
||||
// for later.
|
||||
// Xrays to the corresponding object types. But switching off COWs for certain
|
||||
// things would be too tumultuous at present, so we punt on them for later.
|
||||
static bool
|
||||
ForceCOWBehavior(JSObject *obj)
|
||||
{
|
||||
|
@ -134,6 +133,11 @@ ForceCOWBehavior(JSObject *obj)
|
|||
"instances modulo this hack");
|
||||
return true;
|
||||
}
|
||||
// Proxies get OpaqueXrayTraits, but we still need COWs to them for now to
|
||||
// let the SpecialPowers wrapper work.
|
||||
if (key == JSProto_Proxy)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче