• Peter Marshall's avatar
    [builtins] Don't clear buffer memory that will be overwritten. · e28f7fc9
    Peter Marshall authored
    Currently we initialize the allocated buffer to be full of 0s, which
    adds significant overhead.
    
    TypedArrayConstructByArrayLike will always either fully initialize the
    buffer, or throw an exception, in which case the buffer will not be
    leaked to user code.
    
    The length of the new TypedArray (and thus the buffer) is derived from
    the length of the source Array/TypedArray, so we know that we will
    always set every byte of the new buffer, or throw trying.
    
    Bug:v8:5977
    
    Change-Id: I8ceaa883cfad85f8708a5bdaada3ce463d97e007
    Reviewed-on: https://chromium-review.googlesource.com/469348Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#44447}
    e28f7fc9
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...