Index: test/mjsunit/es7/regress/regress-443982.js |
diff --git a/test/mjsunit/es7/regress/regress-443982.js b/test/mjsunit/es7/regress/regress-443982.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5a2e9cd6db7c2ab897db296b94e6eb1c14fe7fb8 |
--- /dev/null |
+++ b/test/mjsunit/es7/regress/regress-443982.js |
@@ -0,0 +1,22 @@ |
+// Copyright 2014 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. |
+ |
+var records; |
+function observer(r) { |
+ records = r; |
+} |
+ |
+Object.defineProperty(Array.prototype, '0', { |
+ get: function() { return 0; }, |
+ set: function() { throw "boom!"; } |
+}); |
+arr = [1, 2]; |
+Array.observe(arr, observer); |
+arr.length = 0; |
+assertEquals(0, arr.length); |
+ |
+Object.deliverChangeRecords(observer); |
+assertEquals(1, records.length); |
+assertEquals('splice', records[0].type); |
+assertArrayEquals([1, 2], records[0].removed); |