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:
Jim Blandy 2012-03-01 12:59:24 -08:00
parent 2c27f5c68a
commit d40412ecf4

View File

@ -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