-1:000000000000 | 0:a0eeb6e6ffa5 |
---|---|
1 load(libdir + "asserts.js"); | |
2 | |
3 var target = {}; | |
4 Object.getOwnPropertyDescriptor(new Proxy(target, { | |
5 getOwnPropertyDescriptor: function () { | |
6 return {value: 2, configurable: true}; | |
7 } | |
8 }), 'foo'); | |
9 | |
10 var target = {}; | |
11 Object.preventExtensions(target); | |
12 assertThrowsInstanceOf(function () { | |
13 Object.getOwnPropertyDescriptor(new Proxy(target, { | |
14 getOwnPropertyDescriptor: function () { | |
15 return {value: 2, configurable: true}; | |
16 } | |
17 }), 'foo'); | |
18 }, TypeError); |