blob: d1590ecb015b2fa5323d99cef179c8197b30e19a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
var itemsPoisonedIteratorValue = {};
var poisonedValue = {};
Object.defineProperty(poisonedValue, 'value', {
get: function() {
throw new RangeError();
}
});
itemsPoisonedIteratorValue[Symbol.iterator] = function() {
return {
next: function() {
return poisonedValue;
}
};
};
assertThrowsInstanceOf(function() {
Tuple.from(itemsPoisonedIteratorValue);
}, RangeError, 'Tuple.from(itemsPoisonedIteratorValue) throws');
reportCompare(0, 0);
|