Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 5bdb08541f18d5075b5140dceea9d1fba4a88636..10bc3cdbb2515d0566f9b48a509cffe3ff984677 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1238,6 +1238,21 @@ RUNTIME_FUNCTION(Runtime_ObjectDefineProperty) { |
return JSReceiver::DefineProperty(isolate, o, name, attributes); |
} |
+RUNTIME_FUNCTION(Runtime_CreateDataProperty) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 3); |
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, o, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, key, 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
+ bool success; |
+ LookupIterator it = LookupIterator::PropertyOrElement( |
+ isolate, o, key, &success, LookupIterator::HIDDEN); |
+ if (!success) return isolate->heap()->exception(); |
+ MAYBE_RETURN( |
+ JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR), |
+ isolate->heap()->exception()); |
+ return *value; |
+} |
RUNTIME_FUNCTION(Runtime_ObjectDefineProperties) { |
HandleScope scope(isolate); |