blob: 4aee5f484d6b18a677973b9a6272c39d2b86dee7 [file] [log] [blame]
(function() {
var target = {};
for (var i = 0; i < 10; i++)
target["k" + i] = i;
var trapResult = Reflect.ownKeys(target);
var proxy = new Proxy(target, {
ownKeys: function() { return trapResult; },
});
var j = 0, lengthSum = 0;
for (; j < 50_000; ++j)
lengthSum += Reflect.ownKeys(proxy).length;
if (lengthSum !== trapResult.length * j)
throw "Bad assertion!";
})();