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

Unified Diff: src/js/proxy.js

Issue 1516843002: [proxy] fixing harmony/proxy.js tests and improving error messages + some drive-by fixes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP fix protoype walks with access checks 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
Index: src/js/proxy.js
diff --git a/src/js/proxy.js b/src/js/proxy.js
index c4414a23f4903ecc3692a9aef1178e68d7b61770..7d72d2d5a1d76b77c34c493d2e98ed580323160a 100644
--- a/src/js/proxy.js
+++ b/src/js/proxy.js
@@ -36,7 +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(kProxyHandlerReturned, handler, "non-Object",
+ throw MakeTypeError(kProxyTrapReturnedNonObject, handler, trap_result,
"enumerate");
}
// 9. Return trapResult.
@@ -46,8 +46,8 @@ 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(kProxyHandlerReturned, handler, "non-String",
- "enumerate-iterator");
+ throw MakeTypeError(kProxyTrapReturned, handler, "non-String",
+ "enumerate");
}
result.push(key);
}

Powered by Google App Engine
This is Rietveld 408576698