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

Unified Diff: src/compilation-cache.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 | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-cache.cc
diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc
index 6b22bf24283d305a743197701ef363a6348f8f63..94fe37bb939184531c120ce018860d5673e48cee 100644
--- a/src/compilation-cache.cc
+++ b/src/compilation-cache.cc
@@ -331,7 +331,7 @@ MaybeHandle<SharedFunctionInfo> CompilationCache::LookupEval(
if (!IsEnabled()) return MaybeHandle<SharedFunctionInfo>();
MaybeHandle<SharedFunctionInfo> result;
- if (context->IsNativeContext()) {
+ if (context->IsNativeContext() || context->IsGlobalContext()) {
result = eval_global_.Lookup(
source, context, strict_mode, scope_position);
} else {
@@ -367,7 +367,7 @@ void CompilationCache::PutEval(Handle<String> source,
if (!IsEnabled()) return;
HandleScope scope(isolate());
- if (context->IsNativeContext()) {
+ if (context->IsNativeContext() || context->IsGlobalContext()) {
eval_global_.Put(source, context, function_info, scope_position);
} else {
ASSERT(scope_position != RelocInfo::kNoPosition);
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698