Fix for bug 596295 (Remove call_trace workaround (added for bug 592352)). r=luke.
authorPeter Van der Beken <peterv@propagandism.org>
Thu, 16 Dec 2010 16:30:13 +0100
changeset 76330 7670696cd7003111557663dfac0940f431666362
parent 76329 43334e011fe887c88023add64fe5b814e668ae4f
child 76331 1cd7272274401940f88cb3a311c1ba5973585726
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersluke
bugs596295, 592352
milestone9.0a1
Fix for bug 596295 (Remove call_trace workaround (added for bug 592352)). r=luke.
js/src/jsfun.cpp
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -1168,30 +1168,16 @@ call_resolve(JSContext *cx, JSObject *ob
     /* Control flow reaches here only if id was not resolved. */
     return true;
 }
 
 static void
 call_trace(JSTracer *trc, JSObject *obj)
 {
     JS_ASSERT(obj->isCall());
-    if (StackFrame *fp = obj->maybeCallObjStackFrame()) {
-        /*
-         * FIXME: Hide copies of stack values rooted by fp from the Cycle
-         * Collector, which currently lacks a non-stub Unlink implementation
-         * for JS objects (including Call objects), so is unable to collect
-         * cycles involving Call objects whose frames are active without this
-         * hiding hack.
-         */
-        uintN first = JSObject::CALL_RESERVED_SLOTS;
-        uintN count = fp->script()->bindings.countArgsAndVars();
-
-        JS_ASSERT(obj->numSlots() >= first + count);
-        obj->clearSlotRange(first, count);
-    }
 
     MaybeMarkGenerator(trc, obj);
 }
 
 JS_PUBLIC_DATA(Class) js_CallClass = {
     "Call",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_HAS_RESERVED_SLOTS(JSObject::CALL_RESERVED_SLOTS) |