| Index: test/mjsunit/harmony/typedarrays-foreach.js
|
| diff --git a/test/mjsunit/harmony/typedarrays-foreach.js b/test/mjsunit/harmony/typedarrays-foreach.js
|
| index 4bfa655449363e50e6817fe0fb38bc3656035a71..0d34c78efb20f87ddd016c509d8a65dd5aecf592 100644
|
| --- a/test/mjsunit/harmony/typedarrays-foreach.js
|
| +++ b/test/mjsunit/harmony/typedarrays-foreach.js
|
| @@ -85,8 +85,13 @@ function TestTypedArrayForEach(constructor) {
|
| assertEquals(42, a[1]);
|
|
|
| // Neutering the buffer backing the typed array mid-way should
|
| - // still make .forEach() finish, and the array should keep being
|
| - // empty after neutering it.
|
| + // still make .forEach() finish, but exiting early due to the missing
|
| + // elements, and the array should keep being empty after detaching it.
|
| + // TODO(dehrenberg): According to the ES6 spec, accessing or testing
|
| + // for members on a detached TypedArray should throw, so really this
|
| + // should throw in the third iteration. However, this behavior matches
|
| + // the Khronos spec.
|
| + a = new constructor(3);
|
| count = 0;
|
| a.forEach(function (n, index, array) {
|
| if (count > 0) %ArrayBufferNeuter(array.buffer);
|
|
|