Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 2090773006: Fix toString() behavior on proxy objects. (Closed)

Created:
4 years, 6 months ago by Franzi
Modified:
4 years, 5 months ago
Reviewers:
Toon Verwaest, adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@SimplifyIsError
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -10 lines) Patch
M src/objects.cc View 1 4 chunks +9 lines, -10 lines 0 comments Download
M test/mjsunit/es6/object-tostring.js View 1 chunk +13 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 11 (6 generated)
Franzi
Hi, I changed the behavior of toString() for proxy objects. Now we're using the same ...
4 years, 5 months ago (2016-06-27 10:46:17 UTC) #4
Toon Verwaest
lgtm
4 years, 5 months ago (2016-06-27 10:50:40 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2090773006/20001
4 years, 5 months ago (2016-06-27 10:57:06 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-06-27 12:11:40 UTC) #9
commit-bot: I haz the power
4 years, 5 months ago (2016-06-27 12:12:57 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7e4c4cb5c5492bb1cbf408cba1699eee4e92cb24
Cr-Commit-Position: refs/heads/master@{#37289}

Powered by Google App Engine
This is Rietveld 408576698