Source code
Revision control
Copy as Markdown
Other Tools
var q = 0;
function fn() {}
var newTarget = Object.defineProperty(fn.bind(), "prototype", {
get() {
++q;
return null;
}
});
for (var i = 0; i < 100; ++i) {
Reflect.construct(fn, [], newTarget);
}
assertEq(q, 100);