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

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

Issue 1089303003: Migrate error messages, part 3 (runtime.js). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index c387b370fa4dda08d370dd1bd035b4e8a97b173f..d3e3313a2a27bfc9f2fef35f563cf7deea3d3575 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -7,6 +7,7 @@
#include "src/arguments.h"
#include "src/bootstrapper.h"
#include "src/debug.h"
+#include "src/messages.h"
#include "src/runtime/runtime.h"
#include "src/runtime/runtime-utils.h"
@@ -1208,9 +1209,8 @@ static Object* Runtime_NewObjectHelper(Isolate* isolate,
Handle<AllocationSite> site) {
// If the constructor isn't a proper function we throw a type error.
if (!constructor->IsJSFunction()) {
- Vector<Handle<Object> > arguments = HandleVector(&constructor, 1);
- THROW_NEW_ERROR_RETURN_FAILURE(isolate,
- NewTypeError("not_constructor", arguments));
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewTypeError(MessageTemplate::kNotConstructor, constructor));
}
Handle<JSFunction> function = Handle<JSFunction>::cast(constructor);
@@ -1223,9 +1223,8 @@ static Object* Runtime_NewObjectHelper(Isolate* isolate,
// If function should not have prototype, construction is not allowed. In this
// case generated code bailouts here, since function has no initial_map.
if (!function->should_have_prototype() && !function->shared()->bound()) {
- Vector<Handle<Object> > arguments = HandleVector(&constructor, 1);
- THROW_NEW_ERROR_RETURN_FAILURE(isolate,
- NewTypeError("not_constructor", arguments));
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewTypeError(MessageTemplate::kNotConstructor, constructor));
}
Debug* debug = isolate->debug();
« no previous file with comments | « src/runtime.js ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698