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

Unified Diff: src/js/proxy.js

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 | « src/builtins.cc ('k') | src/js/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/proxy.js
diff --git a/src/js/proxy.js b/src/js/proxy.js
index 7d72d2d5a1d76b77c34c493d2e98ed580323160a..11f600e7ec1023bd9eb479d4a9f7b59dfe50a65c 100644
--- a/src/js/proxy.js
+++ b/src/js/proxy.js
@@ -36,8 +36,7 @@ function ProxyEnumerate(trap, handler, target) {
var trap_result = %_Call(trap, handler, target);
// 8. If Type(trapResult) is not Object, throw a TypeError exception.
if (!IS_SPEC_OBJECT(trap_result)) {
- throw MakeTypeError(kProxyTrapReturnedNonObject, handler, trap_result,
- "enumerate");
+ throw MakeTypeError(kProxyEnumerateNonObject);
}
// 9. Return trapResult.
var result = [];
@@ -46,8 +45,7 @@ function ProxyEnumerate(trap, handler, target) {
// Not yet spec'ed as of 2015-11-25, but will be spec'ed soon:
// If the iterator returns a non-string value, throw a TypeError.
if (!IS_STRING(key)) {
- throw MakeTypeError(kProxyTrapReturned, handler, "non-String",
- "enumerate");
+ throw MakeTypeError(kProxyEnumerateNonString);
}
result.push(key);
}
« no previous file with comments | « src/builtins.cc ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698