obj-ptrn-prop-id-get-value-err.js (1115B)
1 // This file was procedurally generated from the following sources: 2 // - src/dstr-binding/obj-ptrn-prop-id-get-value-err.case 3 // - src/dstr-binding/error/try.template 4 /*--- 5 description: Error thrown when accessing the corresponding property of the value object (try statement) 6 esid: sec-runtime-semantics-catchclauseevaluation 7 features: [destructuring-binding] 8 flags: [generated] 9 info: | 10 Catch : catch ( CatchParameter ) Block 11 12 [...] 13 5. Let status be the result of performing BindingInitialization for 14 CatchParameter passing thrownValue and catchEnv as arguments. 15 [...] 16 17 13.3.3.7 Runtime Semantics: KeyedBindingInitialization 18 19 BindingElement : BindingPattern Initializeropt 20 21 1. Let v be GetV(value, propertyName). 22 2. ReturnIfAbrupt(v). 23 ---*/ 24 var initEvalCount = 0; 25 var poisonedProperty = Object.defineProperty({}, 'poisoned', { 26 get: function() { 27 throw new Test262Error(); 28 } 29 }); 30 31 assert.throws(Test262Error, function() { 32 try { 33 throw poisonedProperty; 34 } catch ({ poisoned: x = ++initEvalCount }) {} 35 }); 36 37 assert.sameValue(initEvalCount, 0); 38 39 reportCompare(0, 0);