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

Unified Diff: src/contexts.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/compiler.cc ('k') | src/generator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index cb5e852d7d669c07c8d8b950016defff1572f49c..8eee85fdec15a72b4706aac52e2d8c265c46de4f 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -13,7 +13,10 @@ namespace internal {
Context* Context::declaration_context() {
Context* current = this;
- while (!current->IsFunctionContext() && !current->IsNativeContext()) {
+ while (!current->IsFunctionContext() &&
+ !(current->IsGlobalContext() &&
+ current->previous()->IsNativeContext()) &&
+ !current->IsNativeContext()) {
current = current->previous();
ASSERT(current->closure() == closure());
}
« no previous file with comments | « src/compiler.cc ('k') | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698