-1:000000000000 | 0:905f32eda916 |
---|---|
1 load(libdir + "asserts.js"); | |
2 | |
3 /* | |
4 * Throw a TypeError if the trap reports a new own property on a non-extensible | |
5 * object | |
6 */ | |
7 var target = {}; | |
8 Object.preventExtensions(target); | |
9 assertThrowsInstanceOf(function () { | |
10 Object.getOwnPropertyDescriptor(new Proxy(target, { | |
11 getOwnPropertyDescriptor: function (target, name) { | |
12 return {}; | |
13 } | |
14 }), 'foo'); | |
15 }, TypeError); |