| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 54762699e16f9bdbb592cde7a793f676c21e7657..1c239ace0ebcb4f749b6656e6e79f6c2128ed6a4 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -4296,6 +4296,27 @@ MaybeHandle<Object> JSObject::DefinePropertyOrElementIgnoreAttributes(
|
| }
|
|
|
|
|
| +Maybe<bool> JSObject::CreateDataProperty(LookupIterator* it,
|
| + Handle<Object> value) {
|
| + DCHECK(it->GetReceiver()->IsJSObject());
|
| + Maybe<PropertyAttributes> maybe = JSReceiver::GetPropertyAttributes(it);
|
| + if (maybe.IsNothing()) return Nothing<bool>();
|
| +
|
| + if (it->IsFound()) {
|
| + if (!it->IsConfigurable()) return Just(false);
|
| + } else {
|
| + if (!JSObject::cast(*it->GetReceiver())->IsExtensible()) return Just(false);
|
| + }
|
| +
|
| + RETURN_ON_EXCEPTION_VALUE(
|
| + it->isolate(),
|
| + DefineOwnPropertyIgnoreAttributes(it, value, NONE, DONT_FORCE_FIELD),
|
| + Nothing<bool>());
|
| +
|
| + return Just(true);
|
| +}
|
| +
|
| +
|
| Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithInterceptor(
|
| LookupIterator* it) {
|
| Isolate* isolate = it->isolate();
|
|
|