blob: d8df9ef3f7f480e4a824222fd3d9093c15b1f6fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Handle bailing from a constructor.
var confuzzle = 0;
function BailFromConstructor() {
this.x = "cats";
this.y = confuzzle + 5;
return 4;
}
function f() {
var x;
for (var i = 0; i < 100; i++) {
if (i == 99)
confuzzle = undefined;
x = new BailFromConstructor();
assertEq(typeof(x), "object");
}
}
f();
|