From 791221dfae8afb6c8d5e43691a1bb80103213523 Mon Sep 17 00:00:00 2001 From: Brendan Eich Date: Thu, 21 Aug 2008 04:16:50 -0700 Subject: [PATCH] Followup upvar fix, easy assertbotch avoidance. --- js/src/jsinterp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index b4331887f11..f20f567e46c 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -5203,7 +5203,8 @@ js_Interpret(JSContext *cx) */ funobj = fp->callee; slot += JSCLASS_RESERVED_SLOTS(&js_FunctionClass); - slot += JS_SCRIPT_UPVARS(script)->length; + if (script->upvarsOffset != 0) + slot += JS_SCRIPT_UPVARS(script)->length; if (!JS_GetReservedSlot(cx, funobj, slot, &rval)) goto error; if (JSVAL_IS_VOID(rval))