1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
load(libdir + "immutable-prototype.js"); var count = 0; if (globalPrototypeChainIsMutable()) { Object.defineProperty(__proto__, "__iterator__", { get: (function() { count++; }) }); } else { count = 7; } if (globalPrototypeChainIsMutable()) __proto__ = (function(){}); for (var m = 0; m < 7; ++m) { for (var a in 6) {} } assertEq(count, 7);