Chromium Code Reviews| 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: --enable-fast-array-builtins | |
| 6 | |
| 7 var a = [0,1,2,,,,7]; | |
| 8 var proto = {} | |
| 9 a.__proto__ = proto; | |
| 10 var visits = 0; | |
| 11 Array.prototype.forEach.call(a, (v,i,o) => { ++visits; proto[4] = 4; }); | |
| 12 assertEquals(5, visits); | |
| OLD | NEW |