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

Unified Diff: src/contexts.cc

Issue 715263003: Fix Context::declaration_context to account for script contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | test/cctest/test-debug.cc » ('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 54cbb3e2bb4e1150e90eee4c6d62af1796fbaf32..3da6191a77c98c70f6c872d02027e7f9828aa2b2 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -55,7 +55,8 @@ bool ScriptContextTable::Lookup(Handle<ScriptContextTable> table,
Context* Context::declaration_context() {
Context* current = this;
- while (!current->IsFunctionContext() && !current->IsNativeContext()) {
+ while (!current->IsFunctionContext() && !current->IsNativeContext() &&
+ !current->IsScriptContext()) {
current = current->previous();
DCHECK(current->closure() == closure());
}
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698