Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 5c726bb7cf7ec911ecdea17982df00f645825b5b..6c88b1e13d9da40950a77cc95f81d6906a8a202e 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -766,6 +766,22 @@ RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) { |
return isolate->heap()->undefined_value(); |
} |
+RUNTIME_FUNCTION(Runtime_CopyDataProperties) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 2); |
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, target, 0); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, source, 1); |
+ |
+ // 2. If source is undefined or null, let keys be an empty List. |
+ if (source->IsUndefined(isolate) || source->IsNull(isolate)) { |
+ return isolate->heap()->undefined_value(); |
+ } |
+ |
+ MAYBE_RETURN( |
+ JSReceiver::SetOrCopyDataProperties(isolate, target, source, false), |
+ isolate->heap()->exception()); |
+ return isolate->heap()->undefined_value(); |
+} |
RUNTIME_FUNCTION(Runtime_DefineSetterPropertyUnchecked) { |
HandleScope scope(isolate); |