Fix GC hazard in fun_trace, bug 693754.

This commit is contained in:
Brian Hackett 2011-10-14 15:31:53 -07:00
parent 19e2a50062
commit ed28c77902

View File

@ -1669,8 +1669,12 @@ fun_trace(JSTracer *trc, JSObject *obj)
if (fun->atom)
MarkString(trc, fun->atom, "atom");
if (fun->isInterpreted() && fun->script())
MarkScript(trc, fun->script(), "script");
if (fun->isInterpreted()) {
if (fun->script())
MarkScript(trc, fun->script(), "script");
if (fun->callScope())
MarkObject(trc, *fun->callScope(), "fun_callscope");
}
}
static void