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

Unified Diff: trunk/src/contexts.cc

Issue 505062: Merge r3505 and r3509 to trunk. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years 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 | trunk/src/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/contexts.cc
===================================================================
--- trunk/src/contexts.cc (revision 3508)
+++ trunk/src/contexts.cc (working copy)
@@ -52,11 +52,14 @@
if (global()->IsGlobalObject()) {
return global()->global_context();
}
+
// During bootstrapping, the global object might not be set and we
// have to search the context chain to find the global context.
+ ASSERT(Bootstrapper::IsActive());
Context* current = this;
while (!current->IsGlobalContext()) {
- current = Context::cast(JSFunction::cast(current->closure())->context());
+ JSFunction* closure = JSFunction::cast(current->closure());
+ current = Context::cast(closure->context());
}
return current;
}
« no previous file with comments | « no previous file | trunk/src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698