Fix upvar decompilation for eval-from-fun case (452441, r=igor).
This commit is contained in:
@@ -1318,14 +1318,15 @@ js_obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||
fp->flags |= JSFRAME_EVAL;
|
||||
} while ((fp = fp->down) != caller);
|
||||
|
||||
script = js_CompileScript(cx, scopeobj, principals, TCF_COMPILE_N_GO,
|
||||
script = js_CompileScript(cx, scopeobj, principals,
|
||||
TCF_COMPILE_N_GO |
|
||||
TCF_PUT_STATIC_DEPTH(caller->script->staticDepth + 1),
|
||||
JSSTRING_CHARS(str), JSSTRING_LENGTH(str),
|
||||
NULL, file, line);
|
||||
if (!script) {
|
||||
ok = JS_FALSE;
|
||||
goto out;
|
||||
}
|
||||
script->staticDepth = caller->script->staticDepth + 1;
|
||||
|
||||
if (argc < 2) {
|
||||
/* Execute using caller's new scope object (might be a Call object). */
|
||||
|
||||
Reference in New Issue
Block a user