Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1483)

Unified Diff: src/runtime/runtime-internal.cc

Issue 2688393003: Fix TypeError message for Reflect.construct (Closed)
Patch Set: Fix the rest Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/reflect-construct.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 8ed1e3c0738ed1d3a5f4c212def5de9deb6c24a5..6bbca9ce2c41dd8924156dbfb067ff8becc9ed1a 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -366,6 +366,13 @@ Handle<String> RenderCallSite(Isolate* isolate, Handle<Object> object) {
} // namespace
+RUNTIME_FUNCTION(Runtime_NotConstructor) {
Benedikt Meurer 2017/02/14 04:07:49 Please rename this to ThrowNotConstructor.
vabr (Chromium) 2017/02/14 10:48:20 Done.
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewTypeError(MessageTemplate::kNotConstructor, object));
+}
RUNTIME_FUNCTION(Runtime_ThrowCalledNonCallable) {
HandleScope scope(isolate);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/reflect-construct.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698