]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/for-in-delete-during-iteration.js
2 // Remove a yet-to-be-visited indexed property during iteration.
4 var a
= [1, 2, 3, 4, 5];
14 for (var i
= 0; i
< 10000; ++i
) {
16 throw new Error("bad result");
21 // Remove a yet-to-be-visited non-indexed property during iteration.
22 var foo = function() {
38 for (var i
= 0; i
< 10000; ++i
) {
40 throw new Error("bad result");
44 // Remove then re-add a property during iteration.
45 var foo = function() {
46 var A = function() {};
47 A
.prototype.x
= "A.x";
48 A
.prototype.y
= "A.y";
64 for (var i
= 0; i
< 10000; ++i
) {
65 if (foo() !== "o.zo.yo.x")
66 throw new Error("bad result");