Index: test/mjsunit/regress/regress-crbug-516775.js |
diff --git a/test/mjsunit/regress/regress-crbug-516775.js b/test/mjsunit/regress/regress-crbug-516775.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f956109a2f9529b3c140ec9d09f059f20bcb4ec0 |
--- /dev/null |
+++ b/test/mjsunit/regress/regress-crbug-516775.js |
@@ -0,0 +1,20 @@ |
+// Copyright 2015 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Flags: --allow-natives-syntax |
+ |
+function argument_with_length_getter(f) { |
+ arguments.__defineGetter__('length', f); |
+ return arguments; |
+} |
+ |
+var a1 = []; |
+%NormalizeElements(a1); |
+a1.__proto__ = argument_with_length_getter(function() { return 'boom' }); |
+[].concat(a1); |
+ |
+var a2 = []; |
+%NormalizeElements(a2); |
+a2.__proto__ = argument_with_length_getter(function() { throw 'boom' }); |
+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
|