blob: 50be7598777280dc7d6c460d8d55352d68d8b1a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
desc: Error thrown when accessing the corresponding property of the value object
template: error
info: |
13.3.3.7 Runtime Semantics: KeyedBindingInitialization
BindingElement : BindingPattern Initializeropt
1. Let v be GetV(value, propertyName).
2. ReturnIfAbrupt(v).
---*/
//- setup
var initEvalCount = 0;
var poisonedProperty = Object.defineProperty({}, 'poisoned', {
get: function() {
throw new Test262Error();
}
});
//- elems
{ poisoned: x = ++initEvalCount }
//- vals
poisonedProperty
//- error
Test262Error
//- teardown
assert.sameValue(initEvalCount, 0);
|