Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 27528d644253793d8418fc019ec183557cd52c31..fafc6dbcc5cfad0c72e132fe355ce60d266dc330 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1197,6 +1197,22 @@ MaybeHandle<Object> Object::GetProperty(Isolate* isolate, |
} |
+MaybeHandle<Object> JSObject::DefinePropertyOrElement( |
+ Handle<JSObject> object, Handle<Name> name, Handle<Object> value, |
+ PropertyAttributes attributes, ExecutableAccessorInfoHandling handling) { |
+ uint32_t index; |
+ if (name->AsArrayIndex(&index)) { |
+ return SetOwnElementIgnoreAttributes(object, index, value, attributes, |
+ handling); |
+ } |
+ |
+ // TODO(verwaest): Is this necessary? |
+ if (name->IsString()) name = String::Flatten(Handle<String>::cast(name)); |
+ return SetOwnPropertyIgnoreAttributes(object, name, value, attributes, |
+ handling); |
+} |
+ |
+ |
#define FIELD_ADDR(p, offset) \ |
(reinterpret_cast<byte*>(p) + offset - kHeapObjectTag) |