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

Issue 649203004: Fix NoSideEffectToString. (Closed)

Created:
6 years, 2 months ago by Dmitry Lomov (no reviews)
Modified:
6 years, 2 months ago
Reviewers:
caitp (gmail), Yang
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Fix NoSideEffectToString. Remove unneccessary check for non-overridden toString - it will not be called anyway. R=yangguo@chromium.org

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M src/messages.js View 2 chunks +4 lines, -4 lines 1 comment Download

Messages

Total messages: 4 (1 generated)
Dmitry Lomov (no reviews)
PTAL
6 years, 2 months ago (2014-10-20 16:35:50 UTC) #1
caitp (gmail)
https://codereview.chromium.org/649203004/diff/1/src/messages.js File src/messages.js (right): https://codereview.chromium.org/649203004/diff/1/src/messages.js#newcode229 src/messages.js:229: if (IS_OBJECT(obj)) { So, this will cause arrays to ...
6 years, 2 months ago (2014-10-21 01:09:37 UTC) #3
Dmitry Lomov (no reviews)
6 years, 2 months ago (2014-10-21 06:00:28 UTC) #4
On 2014/10/21 01:09:37, caitp wrote:
> https://codereview.chromium.org/649203004/diff/1/src/messages.js
> File src/messages.js (right):
> 
> https://codereview.chromium.org/649203004/diff/1/src/messages.js#newcode229
> src/messages.js:229: if (IS_OBJECT(obj)) {
> So, this will cause arrays to always be reported as `#<Array>` rather than
> `[object Array]` --- I'm not sure if that's the right behaviour or not ---
> probably doesn't matter a whole lot, but it might be reported as a regression.
> Same thing for similar cases where the `toString` function is overridden
> somewhere in the prototype chain.
> 
> Maybe a better solution is to change the toStringTag CL to make this check for
> both default ObjectToString functions?

Good point. Let's do that. Closing this issue.

Powered by Google App Engine
This is Rietveld 408576698