abrupt-completion.js (559B)
1 // Copyright (C) 2019 Alexey Shvayka. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-object.preventextensions 6 description: > 7 O.[[PreventExtensions]]() returns abrupt completion. 8 info: | 9 Object.preventExtensions ( O ) 10 11 ... 12 2. Let status be ? O.[[PreventExtensions]](). 13 features: [Proxy] 14 ---*/ 15 16 var p = new Proxy({}, { 17 preventExtensions: function() { 18 throw new Test262Error(); 19 }, 20 }); 21 22 assert.throws(Test262Error, function() { 23 Object.preventExtensions(p); 24 }); 25 26 reportCompare(0, 0);