• Peter Marshall's avatar
    [builtins] Use length field in TypedArrayConstructByArrayLike. · c5ad59f4
    Peter Marshall authored
    The byte_length field of the TypedArray is not set to 0 on neutering,
    but JSArrayBufferView::byte_length() returns 0 if WasNeutered() is
    true. We should use the length property here instead.
    
    We can just short-circuit if the length is 0. Added checks to the
    memcpy path that assert length and neutered status are sane.
    
    Bug:chromium:707472,chromium:707595,chromium:707364,chromium:707410
    
    Change-Id: Ia1dec53f175357673012cbbc5e2fc40207e03623
    Reviewed-on: https://chromium-review.googlesource.com/465987Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#44336}
    c5ad59f4
regress-707410.js 321 Bytes