Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index 018347c930f35ffdd7e840a1de15d4688040c1e7..131ab6247e4f474c5b218b3ad66e453835c66cba 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -443,5 +443,15 @@ RUNTIME_FUNCTION(Runtime_ThrowCalledNonCallable) { |
isolate, NewTypeError(MessageTemplate::kCalledNonCallable, callsite)); |
} |
+ |
+RUNTIME_FUNCTION(Runtime_ThrowConstructedNonConstructable) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
+ Handle<String> callsite = RenderCallSite(isolate, object); |
+ THROW_NEW_ERROR_RETURN_FAILURE( |
+ isolate, NewTypeError(MessageTemplate::kNotConstructor, callsite)); |
+} |
+ |
} // namespace internal |
} // namespace v8 |