diff --git a/src/objects.cc b/src/objects.cc index b19a46b053..83c5c736f6 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -1371,11 +1371,6 @@ MaybeHandle Object::GetPropertyWithAccessor(LookupIterator* it) { Isolate* isolate = it->isolate(); Handle structure = it->GetAccessors(); Handle receiver = it->GetReceiver(); - // In case of global IC, the receiver is the global object. Replace by the - // global proxy. - if (receiver->IsJSGlobalObject()) { - receiver = handle(JSGlobalObject::cast(*receiver)->global_proxy(), isolate); - } // We should never get here to initialize a const with the hole value since a // const declaration would conflict with the getter. @@ -1468,11 +1463,6 @@ Maybe Object::SetPropertyWithAccessor(LookupIterator* it, Isolate* isolate = it->isolate(); Handle structure = it->GetAccessors(); Handle receiver = it->GetReceiver(); - // In case of global IC, the receiver is the global object. Replace by the - // global proxy. - if (receiver->IsJSGlobalObject()) { - receiver = handle(JSGlobalObject::cast(*receiver)->global_proxy(), isolate); - } // We should never get here to initialize a const with the hole value since a // const declaration would conflict with the setter. diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index 7f66db0242..86461b832c 100644 --- a/test/cctest/test-api.cc +++ b/test/cctest/test-api.cc @@ -26588,24 +26588,6 @@ TEST(SetPrototypeTemplate) { ExpectTrue("Image.prototype === HTMLImageElement.prototype"); } -void ensure_receiver_is_global_proxy( - v8::Local, const v8::PropertyCallbackInfo& info) { - CHECK(v8::Utils::OpenHandle(*info.This())->IsJSGlobalProxy()); -} - -THREADED_TEST(GlobalAccessorInfo) { - v8::Isolate* isolate = CcTest::isolate(); - v8::HandleScope scope(isolate); - Local global_template = v8::ObjectTemplate::New(isolate); - global_template->SetAccessor( - v8::String::NewFromUtf8(isolate, "prop", v8::NewStringType::kInternalized) - .ToLocalChecked(), - &ensure_receiver_is_global_proxy); - LocalContext env(NULL, global_template); - CompileRun("for (var i = 0; i < 10; i++) this.prop"); - CompileRun("for (var i = 0; i < 10; i++) prop"); -} - UNINITIALIZED_TEST(IncreaseHeapLimitForDebugging) { using namespace i; v8::Isolate::CreateParams create_params;