| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 00c2667c1e38dfdabd73852f806d217b8f7bb150..3135f405ff19e745fc281ca3ed25b55575f1f917 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -898,7 +898,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
|
| Handle<Script> script = isolate->factory()->NewScript(source);
|
| CompilationInfoWithZone info(script);
|
| info.MarkAsEval();
|
| - if (context->IsNativeContext()) info.MarkAsGlobal();
|
| + if (context->IsNativeContext() || context->IsGlobalContext()) {
|
| + info.MarkAsGlobal();
|
| + }
|
| info.SetStrictMode(strict_mode);
|
| info.SetParseRestriction(restriction);
|
| info.SetContext(context);
|
|
|