| Index: src/execution.cc
|
| diff --git a/src/execution.cc b/src/execution.cc
|
| index 330e41fbc9422b5f089d1adbad8ce9e7f44c3de4..512de4cb736aa53b524ee1ec2fd15a2c768013a1 100644
|
| --- a/src/execution.cc
|
| +++ b/src/execution.cc
|
| @@ -100,7 +100,7 @@ static Handle<Object> Invoke(bool is_construct,
|
|
|
| // Make sure that the global object of the context we're about to
|
| // make the current one is indeed a global object.
|
| - ASSERT(function->context()->global_object()->IsGlobalObject());
|
| + ASSERT(function->context()->global()->IsGlobalObject());
|
|
|
| {
|
| // Save and restore context around invocation and block the
|
| @@ -165,10 +165,10 @@ Handle<Object> Execution::Call(Handle<Object> callable,
|
| if (convert_receiver && !receiver->IsJSReceiver() &&
|
| !func->shared()->native() && func->shared()->is_classic_mode()) {
|
| if (receiver->IsUndefined() || receiver->IsNull()) {
|
| - Object* global = func->context()->global_object()->global_receiver();
|
| + Object* global = func->context()->global()->global_receiver();
|
| // Under some circumstances, 'global' can be the JSBuiltinsObject
|
| - // In that case, don't rewrite. (FWIW, the same holds for
|
| - // GetIsolate()->global_object()->global_receiver().)
|
| + // In that case, don't rewrite.
|
| + // (FWIW, the same holds for GetIsolate()->global()->global_receiver().)
|
| if (!global->IsJSBuiltinsObject()) receiver = Handle<Object>(global);
|
| } else {
|
| receiver = ToObject(receiver, pending_exception);
|
| @@ -184,7 +184,7 @@ Handle<Object> Execution::New(Handle<JSFunction> func,
|
| int argc,
|
| Handle<Object> argv[],
|
| bool* pending_exception) {
|
| - return Invoke(true, func, Isolate::Current()->global_object(), argc, argv,
|
| + return Invoke(true, func, Isolate::Current()->global(), argc, argv,
|
| pending_exception);
|
| }
|
|
|
| @@ -246,7 +246,7 @@ Handle<Object> Execution::GetFunctionDelegate(Handle<Object> object) {
|
| if (fun->IsHeapObject() &&
|
| HeapObject::cast(fun)->map()->has_instance_call_handler()) {
|
| return Handle<JSFunction>(
|
| - isolate->native_context()->call_as_function_delegate());
|
| + isolate->global_context()->call_as_function_delegate());
|
| }
|
|
|
| return factory->undefined_value();
|
| @@ -270,7 +270,7 @@ Handle<Object> Execution::TryGetFunctionDelegate(Handle<Object> object,
|
| if (fun->IsHeapObject() &&
|
| HeapObject::cast(fun)->map()->has_instance_call_handler()) {
|
| return Handle<JSFunction>(
|
| - isolate->native_context()->call_as_function_delegate());
|
| + isolate->global_context()->call_as_function_delegate());
|
| }
|
|
|
| // If the Object doesn't have an instance-call handler we should
|
| @@ -303,7 +303,7 @@ Handle<Object> Execution::GetConstructorDelegate(Handle<Object> object) {
|
| if (fun->IsHeapObject() &&
|
| HeapObject::cast(fun)->map()->has_instance_call_handler()) {
|
| return Handle<JSFunction>(
|
| - isolate->native_context()->call_as_constructor_delegate());
|
| + isolate->global_context()->call_as_constructor_delegate());
|
| }
|
|
|
| return isolate->factory()->undefined_value();
|
| @@ -331,7 +331,7 @@ Handle<Object> Execution::TryGetConstructorDelegate(
|
| if (fun->IsHeapObject() &&
|
| HeapObject::cast(fun)->map()->has_instance_call_handler()) {
|
| return Handle<JSFunction>(
|
| - isolate->native_context()->call_as_constructor_delegate());
|
| + isolate->global_context()->call_as_constructor_delegate());
|
| }
|
|
|
| // If the Object doesn't have an instance-call handler we should
|
| @@ -680,7 +680,7 @@ Handle<JSRegExp> Execution::NewJSRegExp(Handle<String> pattern,
|
| Handle<String> flags,
|
| bool* exc) {
|
| Handle<JSFunction> function = Handle<JSFunction>(
|
| - pattern->GetIsolate()->native_context()->regexp_function());
|
| + pattern->GetIsolate()->global_context()->regexp_function());
|
| Handle<Object> re_obj = RegExpImpl::CreateRegExpLiteral(
|
| function, pattern, flags, exc);
|
| if (*exc) return Handle<JSRegExp>();
|
| @@ -726,7 +726,7 @@ Handle<JSFunction> Execution::InstantiateFunction(
|
| // Fast case: see if the function has already been instantiated
|
| int serial_number = Smi::cast(data->serial_number())->value();
|
| Object* elm =
|
| - isolate->native_context()->function_cache()->
|
| + isolate->global_context()->function_cache()->
|
| GetElementNoExceptionThrown(serial_number);
|
| if (elm->IsJSFunction()) return Handle<JSFunction>(JSFunction::cast(elm));
|
| // The function has not yet been instantiated in this context; do it.
|
| @@ -870,7 +870,7 @@ Object* Execution::DebugBreakHelper() {
|
| if (JSFunction::cast(fun)->IsBuiltin()) {
|
| return isolate->heap()->undefined_value();
|
| }
|
| - GlobalObject* global = JSFunction::cast(fun)->context()->global_object();
|
| + GlobalObject* global = JSFunction::cast(fun)->context()->global();
|
| // Don't stop in debugger functions.
|
| if (isolate->debug()->IsDebugGlobal(global)) {
|
| return isolate->heap()->undefined_value();
|
|
|