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

Unified Diff: test/mjsunit/harmony/proxies.js

Issue 1532723005: [proxies] Fix Object.prototype.hasOwnProperty (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/runtime/runtime-object.cc ('k') | test/mjsunit/harmony/proxies-has-own-property.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies.js
diff --git a/test/mjsunit/harmony/proxies.js b/test/mjsunit/harmony/proxies.js
index 69d1dea4bfbb953e68df5e58949456a799c312d1..f3b355b76da60ff2a173e51e264436bedb1a546b 100644
--- a/test/mjsunit/harmony/proxies.js
+++ b/test/mjsunit/harmony/proxies.js
@@ -971,19 +971,19 @@ function TestHasOwn2(create, handler) {
}
TestHasOwn({
- has(t, k) { key = k; return k < "z" }
+ getOwnPropertyDescriptor(t, k) {
+ key = k; if (k < "z") return {configurable: true}
+ },
+ has() { assertUnreachable() }
})
TestHasOwn({
- has(t, k) { return this.hasOwn2(k) },
- hasOwn2(k) { key = k; return k < "z" }
+ getOwnPropertyDescriptor(t, k) { return this.getOwnPropertyDescriptor2(k) },
+ getOwnPropertyDescriptor2(k) {
+ key = k; if (k < "z") return {configurable: true}
+ }
})
-TestHasOwn(new Proxy({}, {
- get(pt, pk, pr) {
- return (t, k) => { key = k; return k < "z" }
- }
-}))
// ---------------------------------------------------------------------------
@@ -1000,24 +1000,13 @@ function TestHasOwnThrow2(create, handler) {
}
TestHasOwnThrow({
- has(t, k) { throw "myexn" }
+ getOwnPropertyDescriptor(t, k) { throw "myexn" }
})
TestHasOwnThrow({
- has(t, k) { return this.hasOwn2(k) },
- hasOwn2(k) { throw "myexn" }
-})
-
-TestHasOwnThrow(new Proxy({}, {
- get(pt, pk, pr) { throw "myexn" }
-}))
-
-TestHasOwnThrow(new Proxy({}, {
- get(pt, pk, pr) {
- return (t, k) => { throw "myexn" }
- }
-}));
-
+ getOwnPropertyDescriptor(t, k) { return this.getOwnPropertyDescriptor2(k) },
+ getOwnPropertyDescriptor2(k) { throw "myexn" }
+});
// ---------------------------------------------------------------------------
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/mjsunit/harmony/proxies-has-own-property.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698