Followup upvar fix, easy assertbotch avoidance.

This commit is contained in:
Brendan Eich 2008-08-21 04:16:50 -07:00
parent fd148818e1
commit 791221dfae

View File

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