Toggle JSOPTION_COMPILE_N_GO around compilation in JS_EvaluateUCInStackFrame (280086, r=shaver).

This commit is contained in:
brendan%mozilla.org 2005-01-28 18:14:05 +00:00
parent 6dbe716ae1
commit 449bc22ed5

View File

@ -867,7 +867,7 @@ JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp,
const char *filename, uintN lineno,
jsval *rval)
{
uint32 flags;
uint32 flags, options;
JSScript *script;
JSBool ok;
@ -877,10 +877,13 @@ JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp,
*/
flags = fp->flags;
fp->flags |= JSFRAME_DEBUGGER | JSFRAME_EVAL;
options = cx->options;
cx->options = options | JSOPTION_COMPILE_N_GO;
script = JS_CompileUCScriptForPrincipals(cx, fp->scopeChain,
JS_StackFramePrincipals(cx, fp),
bytes, length, filename, lineno);
fp->flags = flags;
cx->options = options;
if (!script)
return JS_FALSE;