• franzih's avatar
    Fix toString() behavior on proxy objects. · 7e4c4cb5
    franzih authored
    Proxy objects need special treatment in toString(). Usually, we use the
    @@toStringTag, if it is set, otherwise we determine the result of toString()
    by checking IsArray() and other internal slots. According to
    ES2017 19.1.3.6, IsArray() and the internal slots  must be checked first,
    then get(@@toStringTag). The result of IsArray() and internal slots is discarded if
    @@toStringTag is set. For proxy
    objects, we must obey this order, because get() can have side-effects, i.e.,
    revoke the proxy. For all other objects, we can skip the check of the
    internal slots, if @@toStringTag is set.
    
    BUG=
    
    CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
    
    Review-Url: https://codereview.chromium.org/2090773006
    Cr-Commit-Position: refs/heads/master@{#37289}
    7e4c4cb5
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/binutils 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...
Makefile.nacl 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...