Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 5648f667b841d601fc7810ab5f06b2eeb89d0c4d..43ba1df47cf3588018b4a4234ae55db8b9e39aa4 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4110,8 +4110,14 @@ Maybe<bool> JSObject::SetPropertyWithInterceptor(LookupIterator* it, |
Handle<JSObject> holder = it->GetHolder<JSObject>(); |
bool result; |
- PropertyCallbackArguments args(isolate, interceptor->data(), |
- *it->GetReceiver(), *holder, should_throw); |
+ Handle<Object> receiver = it->GetReceiver(); |
+ if (!receiver->IsJSReceiver()) { |
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, receiver, |
+ Object::ConvertReceiver(isolate, receiver), |
+ Nothing<bool>()); |
+ } |
+ PropertyCallbackArguments args(isolate, interceptor->data(), *receiver, |
+ *holder, should_throw); |
if (it->IsElement()) { |
uint32_t index = it->index(); |
@@ -5393,9 +5399,14 @@ Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor( |
!interceptor->can_intercept_symbols()) { |
return Just(ABSENT); |
} |
- PropertyCallbackArguments args(isolate, interceptor->data(), |
- *it->GetReceiver(), *holder, |
- Object::DONT_THROW); |
+ Handle<Object> receiver = it->GetReceiver(); |
+ if (!receiver->IsJSReceiver()) { |
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, receiver, |
+ Object::ConvertReceiver(isolate, receiver), |
+ Nothing<PropertyAttributes>()); |
+ } |
+ PropertyCallbackArguments args(isolate, interceptor->data(), *receiver, |
+ *holder, Object::DONT_THROW); |
if (!interceptor->query()->IsUndefined()) { |
Handle<Object> result; |
if (it->IsElement()) { |
@@ -5839,9 +5850,15 @@ Maybe<bool> JSObject::DeletePropertyWithInterceptor(LookupIterator* it, |
if (interceptor->deleter()->IsUndefined()) return Nothing<bool>(); |
Handle<JSObject> holder = it->GetHolder<JSObject>(); |
+ Handle<Object> receiver = it->GetReceiver(); |
+ if (!receiver->IsJSReceiver()) { |
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, receiver, |
+ Object::ConvertReceiver(isolate, receiver), |
+ Nothing<bool>()); |
+ } |
- PropertyCallbackArguments args(isolate, interceptor->data(), |
- *it->GetReceiver(), *holder, should_throw); |
+ PropertyCallbackArguments args(isolate, interceptor->data(), *receiver, |
+ *holder, should_throw); |
Handle<Object> result; |
if (it->IsElement()) { |
uint32_t index = it->index(); |
@@ -14946,9 +14963,13 @@ MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it, |
Handle<JSObject> holder = it->GetHolder<JSObject>(); |
Handle<Object> result; |
- PropertyCallbackArguments args(isolate, interceptor->data(), |
- *it->GetReceiver(), *holder, |
- Object::DONT_THROW); |
+ Handle<Object> receiver = it->GetReceiver(); |
+ if (!receiver->IsJSReceiver()) { |
+ ASSIGN_RETURN_ON_EXCEPTION( |
+ isolate, receiver, Object::ConvertReceiver(isolate, receiver), Object); |
+ } |
+ PropertyCallbackArguments args(isolate, interceptor->data(), *receiver, |
+ *holder, Object::DONT_THROW); |
if (it->IsElement()) { |
uint32_t index = it->index(); |