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

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

Issue 1130783002: Migrate error messages, part 9. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/objects.cc ('k') | src/runtime/runtime-internal.cc » ('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 dafaacf06293fffa99fbb7a6c9354bfc6d2853ef..3dc3a244db441d7f4a996e22e56e79fca4b014b9 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -9,6 +9,7 @@
#include "src/arguments.h"
#include "src/debug.h"
+#include "src/messages.h"
#include "src/runtime/runtime.h"
#include "src/runtime/runtime-utils.h"
@@ -21,21 +22,15 @@ RUNTIME_FUNCTION(Runtime_ThrowNonMethodError) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewReferenceError("non_method", HandleVector<Object>(NULL, 0)));
-}
-
-
-static Object* ThrowUnsupportedSuper(Isolate* isolate) {
- THROW_NEW_ERROR_RETURN_FAILURE(
- isolate,
- NewReferenceError("unsupported_super", HandleVector<Object>(NULL, 0)));
+ isolate, NewReferenceError(MessageTemplate::kNonMethod));
}
RUNTIME_FUNCTION(Runtime_ThrowUnsupportedSuperError) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
- return ThrowUnsupportedSuper(isolate);
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewReferenceError(MessageTemplate::kUnsupportedSuper));
}
@@ -43,8 +38,7 @@ RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate,
- NewTypeError("constructor_noncallable", HandleVector<Object>(NULL, 0)));
+ isolate, NewTypeError(MessageTemplate::kConstructorNonCallable));
}
@@ -52,8 +46,7 @@ RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) {
HandleScope scope(isolate);
DCHECK(args.length() == 0);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate,
- NewTypeError("array_not_subclassable", HandleVector<Object>(NULL, 0)));
+ isolate, NewTypeError(MessageTemplate::kArrayNotSubclassable));
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698