OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Flags: --allow-natives-syntax | |
6 | |
7 function argument_with_length_getter(f) { | |
8 arguments.__defineGetter__('length', f); | |
9 return arguments; | |
10 } | |
11 | |
12 var a1 = []; | |
13 %NormalizeElements(a1); | |
14 a1.__proto__ = argument_with_length_getter(function() { return 'boom' }); | |
15 [].concat(a1); | |
16 | |
17 var a2 = []; | |
18 %NormalizeElements(a2); | |
19 a2.__proto__ = argument_with_length_getter(function() { throw 'boom' }); | |
20 assertThrows(function() { [].concat(a2); }); | |
adamk
2015/08/05 18:05:53
As I said over on the bug, I think this behavior i
Michael Starzinger
2015/08/05 19:37:28
+1. My understanding of the expected behavior is s
| |
OLD | NEW |