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

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

Issue 1126043004: Migrate error messages, part 10. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed and rebased 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/runtime.js ('k') | src/runtime/runtime-date.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 3dc3a244db441d7f4a996e22e56e79fca4b014b9..f084fd60fb37a74947badb39980ce0a5db2a2453 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -52,7 +52,7 @@ RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) {
static Object* ThrowStaticPrototypeError(Isolate* isolate) {
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewTypeError("static_prototype", HandleVector<Object>(NULL, 0)));
+ isolate, NewTypeError(MessageTemplate::kStaticPrototype));
}
@@ -113,28 +113,25 @@ RUNTIME_FUNCTION(Runtime_DefineClass) {
prototype_parent = isolate->factory()->null_value();
} else if (super_class->IsSpecFunction()) {
if (Handle<JSFunction>::cast(super_class)->shared()->is_generator()) {
- Handle<Object> args[1] = {super_class};
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
- NewTypeError("extends_value_generator", HandleVector(args, 1)));
+ NewTypeError(MessageTemplate::kExtendsValueGenerator, super_class));
}
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, prototype_parent,
Runtime::GetObjectProperty(isolate, super_class,
isolate->factory()->prototype_string()));
if (!prototype_parent->IsNull() && !prototype_parent->IsSpecObject()) {
- Handle<Object> args[1] = {prototype_parent};
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewTypeError("prototype_parent_not_an_object",
- HandleVector(args, 1)));
+ isolate, NewTypeError(MessageTemplate::kPrototypeParentNotAnObject,
+ prototype_parent));
}
constructor_parent = super_class;
} else {
// TODO(arv): Should be IsConstructor.
- Handle<Object> args[1] = {super_class};
THROW_NEW_ERROR_RETURN_FAILURE(
isolate,
- NewTypeError("extends_value_not_a_function", HandleVector(args, 1)));
+ NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class));
}
}
« no previous file with comments | « src/runtime.js ('k') | src/runtime/runtime-date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698