Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index be96e5e4564c6cc13321e8ccf9003b8dc0c4ee4a..422d993b5f43125ba505252aaf0105424a8457cf 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -466,7 +466,6 @@ RUNTIME_FUNCTION(Runtime_ThrowConstructedNonConstructable) { |
isolate, NewTypeError(MessageTemplate::kNotConstructor, callsite)); |
} |
- |
RUNTIME_FUNCTION(Runtime_ThrowDerivedConstructorReturnedNonObject) { |
HandleScope scope(isolate); |
DCHECK_EQ(0, args.length()); |
@@ -474,6 +473,13 @@ RUNTIME_FUNCTION(Runtime_ThrowDerivedConstructorReturnedNonObject) { |
isolate, NewTypeError(MessageTemplate::kDerivedConstructorReturn)); |
} |
+RUNTIME_FUNCTION(Runtime_ThrowUndefinedOrNullToObject) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, NewTypeError(MessageTemplate::kUndefinedOrNullToObject, name)); |
+} |
// ES6 section 7.3.17 CreateListFromArrayLike (obj) |
RUNTIME_FUNCTION(Runtime_CreateListFromArrayLike) { |