Backed out changeset be63a51a0a3b. Breaks tofte if run from ./time.sh.

This commit is contained in:
Andreas Gal
2008-08-20 14:57:49 -07:00
parent 6939ca853c
commit bedc33024f
9 changed files with 21 additions and 85 deletions

View File

@@ -1229,6 +1229,8 @@ obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
}
/* From here on, control must exit through label out with ok set. */
js_DisablePropertyCache(cx);
if (!scopeobj) {
#if JS_HAS_EVAL_THIS_SCOPE
/* If obj.eval(str), emulate 'with (obj) eval(str)' in the caller. */
@@ -1339,8 +1341,7 @@ obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if (ok)
ok = js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);
script->u.nextToGC = JS_SCRIPTS_TO_GC(cx);
JS_SCRIPTS_TO_GC(cx) = script;
JS_DestroyScript(cx, script);
out:
#if JS_HAS_EVAL_THIS_SCOPE
@@ -1353,6 +1354,8 @@ out:
if (setCallerVarObj)
caller->varobj = callerVarObj;
#endif
js_EnablePropertyCache(cx);
return ok;
}