Bug 761914 (part 3) - Do level check in UpvarCookie::set(). r=jorendorff.

This commit is contained in:
Nicholas Nethercote
2012-06-07 18:48:37 -07:00
parent 1d74e03229
commit b824763ab3
8 changed files with 71 additions and 67 deletions

View File

@@ -119,8 +119,7 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
GlobalScope globalScope(cx, globalObj);
bce.globalScope = &globalScope;
if (!SetStaticLevel(&sc, staticLevel))
return NULL;
sc.staticLevel = staticLevel;
/* If this is a direct call to eval, inherit the caller's strictness. */
if (callerFrame && callerFrame->isScriptFrame() && callerFrame->script()->strictModeCode)