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

Unified Diff: src/objects.cc

Issue 1083083004: Reland "Migrate error messages, part 2." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for layout test 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/messages.js ('k') | src/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 9ae8cbb7aaf1e89cfbd4f99cb9bf3dab16aa80a2..96175488c8d066dfb3cbdcb4a55db7d0dbddcdf6 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -34,6 +34,7 @@
#include "src/log.h"
#include "src/lookup.h"
#include "src/macro-assembler.h"
+#include "src/messages.h"
#include "src/objects-inl.h"
#include "src/prototype.h"
#include "src/safepoint-table.h"
@@ -298,10 +299,9 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(Handle<Object> receiver,
if (structure->IsAccessorInfo()) {
Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(structure);
if (!info->IsCompatibleReceiver(*receiver)) {
- Handle<Object> args[] = {name, receiver};
THROW_NEW_ERROR(isolate,
- NewTypeError("incompatible_method_receiver",
- HandleVector(args, arraysize(args))),
+ NewTypeError(MessageTemplate::kIncompatibleMethodReceiver,
+ name, receiver),
Object);
}
@@ -363,10 +363,9 @@ MaybeHandle<Object> Object::SetPropertyWithAccessor(
// api style callbacks
ExecutableAccessorInfo* info = ExecutableAccessorInfo::cast(*structure);
if (!info->IsCompatibleReceiver(*receiver)) {
- Handle<Object> args[] = {name, receiver};
THROW_NEW_ERROR(isolate,
- NewTypeError("incompatible_method_receiver",
- HandleVector(args, arraysize(args))),
+ NewTypeError(MessageTemplate::kIncompatibleMethodReceiver,
+ name, receiver),
Object);
}
Object* call_obj = info->setter();
@@ -12466,9 +12465,7 @@ MaybeHandle<Object> JSObject::SetPrototype(Handle<JSObject> object,
!iter.IsAtEnd(); iter.Advance()) {
if (JSReceiver::cast(iter.GetCurrent()) == *object) {
// Cycle detected.
- THROW_NEW_ERROR(isolate,
- NewError("cyclic_proto", HandleVector<Object>(NULL, 0)),
- Object);
+ THROW_NEW_ERROR(isolate, NewError(MessageTemplate::kCyclicProto), Object);
}
}
« no previous file with comments | « src/messages.js ('k') | src/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698