• littledan's avatar
    Allow TypedArrays to be initialized with iterables · 40420f67
    littledan authored
    In ES6, the TypedArray constructor can be called either with an
    array-like object or an iterable. The code previously handled
    only array-like objects. This patch switches to supporting
    iterables while throwing in an optimization to make Arrays
    get allocated the old way, without an extra copy.
    
    BUG=v8:4090
    LOG=Y
    R=adamk
    
    Review URL: https://codereview.chromium.org/1181903003
    
    Cr-Commit-Position: refs/heads/master@{#29031}
    40420f67
typedarray.js 15.7 KB