Index: bleeding_edge/src/contexts.cc |
=================================================================== |
--- bleeding_edge/src/contexts.cc (revision 3503) |
+++ bleeding_edge/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; |
} |