1 2 3 4 5 6 7 8 9 10 11 12 13 14
function TestCase(n, d) {} function reportCompare() { new TestCase; } Object.defineProperty(Object.prototype, "name", {}); reportCompare(); try { function TestCase( n, d ) { this.name = n; this.description = d; } reportCompare(); reportCompare(); } catch(exc3) { assertEq(0, 1); }