DescriptionFix toString() behavior on proxy objects.
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
Committed: https://crrev.com/7e4c4cb5c5492bb1cbf408cba1699eee4e92cb24
Cr-Commit-Position: refs/heads/master@{#37289}
Patch Set 1 #Patch Set 2 : Rebase #
Depends on Patchset: Messages
Total messages: 11 (6 generated)
|