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

Unified Diff: src/builtins.cc

Issue 1527583002: [proxies] Improve error messages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years 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 | « no previous file | src/js/proxy.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 905bc0155ef0cfafc2e39c1c6705279ac64d97be..dba56372e469814cb5c4652ef01e1d5d660918ee 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -1829,8 +1829,8 @@ namespace {
MaybeHandle<JSProxy> ProxyCreate(Isolate* isolate, Handle<Object> target,
Handle<Object> handler) {
if (!target->IsJSReceiver()) {
- THROW_NEW_ERROR(
- isolate, NewTypeError(MessageTemplate::kProxyTargetNonObject), JSProxy);
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kProxyNonObject),
+ JSProxy);
}
if (target->IsJSProxy() && JSProxy::cast(*target)->IsRevoked()) {
THROW_NEW_ERROR(isolate,
@@ -1838,8 +1838,7 @@ MaybeHandle<JSProxy> ProxyCreate(Isolate* isolate, Handle<Object> target,
JSProxy);
}
if (!handler->IsJSReceiver()) {
- THROW_NEW_ERROR(isolate,
- NewTypeError(MessageTemplate::kProxyHandlerNonObject),
+ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kProxyNonObject),
JSProxy);
}
if (handler->IsJSProxy() && JSProxy::cast(*handler)->IsRevoked()) {
« no previous file with comments | « no previous file | src/js/proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698