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

Unified Diff: test/mjsunit/for-in-opt.js

Issue 1717893002: Remove the Proxy enumerate trap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests Created 4 years, 10 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/objects.cc ('k') | test/mjsunit/harmony/debug-stepin-proxies.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/for-in-opt.js
diff --git a/test/mjsunit/for-in-opt.js b/test/mjsunit/for-in-opt.js
index 78c39fdd525a1a1953c50dcd7e7abcaed898ec55..8f735393825446e52a91f9e8ec156c7ba3f04870 100644
--- a/test/mjsunit/for-in-opt.js
+++ b/test/mjsunit/for-in-opt.js
@@ -28,13 +28,14 @@ var deopt_has = false;
var deopt_enum = false;
var handler = {
- enumerate(target) {
+ ownKeys() {
if (deopt_enum) {
%DeoptimizeFunction(f2);
deopt_enum = false;
}
- return keys[Symbol.iterator]();
+ return keys;
},
+ getOwnPropertyDescriptor() { return { enumerable: true, configurable: true }},
has(target, k) {
if (deopt_has) {
@@ -42,7 +43,7 @@ var handler = {
deopt_has = false;
}
has_keys.push(k);
- return {value: 10, configurable: true, writable: false, enumerable: true};
+ return true;
}
};
@@ -136,14 +137,13 @@ function listener(event, exec_state, event_data, data) {
}
var handler3 = {
- enumerate(target) {
- return ["a", "b"][Symbol.iterator]();
- },
+ ownKeys() { return ["a", "b"] },
+ getOwnPropertyDescriptor() { return { enumerable: true, configurable: true }},
has(target, k) {
if (k == "a") count++;
if (x) %ScheduleBreak();
- return {value: 10, configurable: true, writable: false, enumerable: true};
+ return true;
}
};
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/harmony/debug-stepin-proxies.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698