| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 27528d644253793d8418fc019ec183557cd52c31..501eef4c20086a1d2361542b0117d0eb1a868340 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -1194,6 +1194,20 @@
|
| const char* name) {
|
| Handle<String> str = isolate->factory()->InternalizeUtf8String(name);
|
| return GetProperty(object, str);
|
| +}
|
| +
|
| +
|
| +MaybeHandle<Object> JSObject::DefinePropertyOrElement(
|
| + Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
|
| + PropertyAttributes attributes) {
|
| + uint32_t index;
|
| + if (name->AsArrayIndex(&index)) {
|
| + return SetOwnElementIgnoreAttributes(object, index, value, attributes);
|
| + }
|
| +
|
| + // TODO(verwaest): Is this necessary?
|
| + if (name->IsString()) name = String::Flatten(Handle<String>::cast(name));
|
| + return SetOwnPropertyIgnoreAttributes(object, name, value, attributes);
|
| }
|
|
|
|
|
|
|