Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: src/compiler.cc

Issue 653603002: Try to fix cross-script global scope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compilation-cache.cc ('k') | src/contexts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/compilation-cache.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698