From d40412ecf44254401a8e2d0c8b2897596a0fa7f1 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Thu, 1 Mar 2012 12:59:24 -0800 Subject: [PATCH] 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. --- js/src/jsproxy.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/src/jsproxy.cpp b/js/src/jsproxy.cpp index edf17f324f90..e8a14d574f07 100644 --- a/js/src/jsproxy.cpp +++ b/js/src/jsproxy.cpp @@ -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