blob: 88912fa5a2b4d457951d8f0b2fb35183ab76e272 [file] [log] [blame]
keith_miller@apple.combcc77f22016-07-15 06:03:25 +00001// Copyright (C) 2015 the V8 project authors. All rights reserved.
2// This code is governed by the BSD license found in the LICENSE file.
3/*---
4es6id: 19.1.2.1
5description: Invoked with a source whose own property keys cannot be retrieved
6info: >
7 [...]
8 5. For each element nextSource of sources, in ascending index order,
9 a. If nextSource is undefined or null, let keys be an empty List.
10 b. Else,
11 i. Let from be ToObject(nextSource).
12 ii. ReturnIfAbrupt(from).
13 iii. Let keys be from.[[OwnPropertyKeys]]().
14 iv. ReturnIfAbrupt(keys).
15features: [Proxy]
16---*/
17
18var source = new Proxy({}, {
19 ownKeys: function() {
20 throw new Test262Error();
21 }
22});
23
24assert.throws(Test262Error, function() {
25 Object.assign({}, source);
26});