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

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

Issue 2614053002: Improve error message for calling super() twice in a derived constructor (Closed)
Patch Set: Merged Created 3 years, 11 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/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index 1c53f0f62619df84cbe9b109bc645c8bf4019778..246079232b468d793fd69b71af92999eb78fe84a 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -45,6 +45,13 @@ RUNTIME_FUNCTION(Runtime_ThrowStaticPrototypeError) {
isolate, NewTypeError(MessageTemplate::kStaticPrototype));
}
+RUNTIME_FUNCTION(Runtime_ThrowSuperAlreadyCalledError) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(0, args.length());
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewReferenceError(MessageTemplate::kSuperAlreadyCalled));
+}
+
namespace {
Object* ThrowNotSuperConstructor(Isolate* isolate, Handle<Object> constructor,
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698