2015-07-16 00:45:38 +02:00
|
|
|
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
2017-06-27 23:12:06 +02:00
|
|
|
esid: sec-array.from
|
2015-07-16 00:45:38 +02:00
|
|
|
description: Error accessing items' `Symbol.iterator` attribute
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-07-16 00:45:38 +02:00
|
|
|
[...]
|
|
|
|
4. Let usingIterator be GetMethod(items, @@iterator).
|
|
|
|
5. ReturnIfAbrupt(usingIterator).
|
|
|
|
features: [Symbol.iterator]
|
|
|
|
---*/
|
|
|
|
|
|
|
|
var items = {};
|
|
|
|
Object.defineProperty(items, Symbol.iterator, {
|
|
|
|
get: function() {
|
|
|
|
throw new Test262Error();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
assert.throws(Test262Error, function() {
|
|
|
|
Array.from(items);
|
|
|
|
});
|