mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-12 14:37:50 +00:00
Bug 721642: Remove function proxy support from proxy_TraceObject. r=jorendorff
Function proxies will always call proxy_TraceFunction, which handles the 'call' and 'construct' slots. This patch also moves the call to proxy_TraceObject from proxy_TraceFunction into a tail position, so it could be compiled as a jump.
This commit is contained in:
parent
2c27f5c68a
commit
d40412ecf4
@ -1251,18 +1251,14 @@ proxy_TraceObject(JSTracer *trc, JSObject *obj)
|
||||
MarkCrossCompartmentSlot(trc, &obj->getReservedSlotRef(JSSLOT_PROXY_PRIVATE), "private");
|
||||
MarkCrossCompartmentSlot(trc, &obj->getReservedSlotRef(JSSLOT_PROXY_EXTRA + 0), "extra0");
|
||||
MarkCrossCompartmentSlot(trc, &obj->getReservedSlotRef(JSSLOT_PROXY_EXTRA + 1), "extra1");
|
||||
if (IsFunctionProxy(obj)) {
|
||||
MarkCrossCompartmentSlot(trc, &GetCall(obj), "call");
|
||||
MarkCrossCompartmentSlot(trc, &GetFunctionProxyConstruct(obj), "construct");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
proxy_TraceFunction(JSTracer *trc, JSObject *obj)
|
||||
{
|
||||
proxy_TraceObject(trc, obj);
|
||||
MarkCrossCompartmentSlot(trc, &GetCall(obj), "call");
|
||||
MarkCrossCompartmentSlot(trc, &GetFunctionProxyConstruct(obj), "construct");
|
||||
proxy_TraceObject(trc, obj);
|
||||
}
|
||||
|
||||
static JSBool
|
||||
|
Loading…
Reference in New Issue
Block a user