| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 5b0bfc353551004ad23760b81362a1d6ad4c2994..6041ee0f73d3fe120359eb6563cc1b36e669cbfb 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -8749,7 +8749,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_NewGlobalContext) {
|
| isolate->heap()->AllocateGlobalContext(function, scope_info);
|
| if (!maybe_result->To(&result)) return maybe_result;
|
|
|
| + ASSERT(function->context() == isolate->context());
|
| + ASSERT(function->context()->global_object() == result->global_object());
|
| isolate->set_context(result);
|
| + result->global_object()->set_global_context(result);
|
|
|
| return result; // non-failure
|
| }
|
| @@ -11272,7 +11275,7 @@ class ScopeIterator {
|
| } else {
|
| ASSERT(scope_info->Type() == EVAL_SCOPE);
|
| info.MarkAsEval();
|
| - info.SetCallingContext(Handle<Context>(function_->context()));
|
| + info.SetContext(Handle<Context>(function_->context()));
|
| }
|
| if (ParserApi::Parse(&info, kNoParsingFlags) && Scope::Analyze(&info)) {
|
| scope = info.function()->scope();
|
|
|