Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 2898c6cb0c442a47c8a8217308e7dd474d58bb1c..94577bcf92843500373e8554b37cbb4875f8be30 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1070,6 +1070,12 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(LookupIterator* it) { |
v8::ToCData<v8::AccessorNameGetterCallback>(info->getter()); |
if (call_fun == nullptr) return isolate->factory()->undefined_value(); |
+ if (info->is_sloppy() && !receiver->IsJSReceiver()) { |
+ ASSIGN_RETURN_ON_EXCEPTION(isolate, receiver, |
+ Object::ConvertReceiver(isolate, receiver), |
+ Object); |
+ } |
+ |
PropertyCallbackArguments args(isolate, info->data(), *receiver, *holder, |
Object::DONT_THROW); |
Handle<Object> result = args.Call(call_fun, name); |
@@ -1154,6 +1160,12 @@ Maybe<bool> Object::SetPropertyWithAccessor(LookupIterator* it, |
// have a setter. |
if (call_fun == nullptr) return Just(true); |
+ if (info->is_sloppy() && !receiver->IsJSReceiver()) { |
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
+ isolate, receiver, Object::ConvertReceiver(isolate, receiver), |
+ Nothing<bool>()); |
+ } |
+ |
PropertyCallbackArguments args(isolate, info->data(), *receiver, *holder, |
should_throw); |
args.Call(call_fun, name, value); |