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

Unified Diff: src/objects.cc

Issue 1099573002: Migrate error messages, part 4 (v8natives.js). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix wrong assertion 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/object-observe.js ('k') | src/proxy.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 4e14108e6e73414962d9f0e2a444f031648fa149..5b9c04ee45c500b0646b55d2894b1b5a95b17662 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3314,9 +3314,8 @@ MaybeHandle<Object> Object::RedefineNonconfigurableProperty(
Isolate* isolate, Handle<Object> name, Handle<Object> value,
LanguageMode language_mode) {
if (is_sloppy(language_mode)) return value;
- Handle<Object> args[] = {name};
- THROW_NEW_ERROR(isolate, NewTypeError("redefine_disallowed",
- HandleVector(args, arraysize(args))),
+ THROW_NEW_ERROR(isolate,
+ NewTypeError(MessageTemplate::kRedefineDisallowed, name),
Object);
}
@@ -3903,9 +3902,9 @@ MaybeHandle<Object> JSProxy::SetPropertyViaPrototypesWithHandler(
if (configurable->IsFalse()) {
Handle<String> trap = isolate->factory()->InternalizeOneByteString(
STATIC_CHAR_VECTOR("getPropertyDescriptor"));
- Handle<Object> args[] = { handler, trap, name };
- THROW_NEW_ERROR(isolate, NewTypeError("proxy_prop_not_configurable",
- HandleVector(args, arraysize(args))),
+ THROW_NEW_ERROR(isolate,
+ NewTypeError(MessageTemplate::kProxyPropNotConfigurable,
+ handler, name, trap),
Object);
}
DCHECK(configurable->IsTrue());
@@ -4045,9 +4044,8 @@ Maybe<PropertyAttributes> JSProxy::GetPropertyAttributesWithHandler(
Handle<Object> handler(proxy->handler(), isolate);
Handle<String> trap = isolate->factory()->InternalizeOneByteString(
STATIC_CHAR_VECTOR("getPropertyDescriptor"));
- Handle<Object> args[] = { handler, trap, name };
Handle<Object> error = isolate->factory()->NewTypeError(
- "proxy_prop_not_configurable", HandleVector(args, arraysize(args)));
+ MessageTemplate::kProxyPropNotConfigurable, handler, name, trap);
isolate->Throw(*error);
return Just(NONE);
}
@@ -4107,10 +4105,9 @@ MaybeHandle<Object> JSProxy::CallTrap(Handle<JSProxy> proxy,
if (trap->IsUndefined()) {
if (derived.is_null()) {
- Handle<Object> args[] = { handler, trap_name };
THROW_NEW_ERROR(isolate,
- NewTypeError("handler_trap_missing",
- HandleVector(args, arraysize(args))),
+ NewTypeError(MessageTemplate::kProxyHandlerTrapMissing,
+ handler, trap_name),
Object);
}
trap = Handle<Object>(derived);
« no previous file with comments | « src/object-observe.js ('k') | src/proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698