blob: 51ece0fe4bcbd83dbb7b037fc21d72a8db047190 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
var g = newGlobal();
var w = g.eval("() => {}");
var v = g.eval("Array");
try {
Reflect.construct(Array, [], w);
assertEq(true, false, "Expected exception above");
} catch (e) {
assertEq(e.constructor, TypeError);
}
try {
Reflect.construct(v, [], w);
assertEq(true, false, "Expected exception above");
} catch (e) {
assertEq(e.constructor, TypeError);
}
|