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

Issue 461453002: Implement well-known symbol `Symbol.toStringTag`

Created:
6 years, 4 months ago by ziyunfei
Modified:
6 years, 4 months ago
Reviewers:
l446240525
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@master
Project:
v8
Visibility:
Public.

Description

Implement well-known symbol `Symbol.toStringTag` BUG=v8:3502

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -4 lines) Patch
M src/collection.js View 2 chunks +2 lines, -0 lines 0 comments Download
M src/symbol.js View 2 chunks +18 lines, -2 lines 0 comments Download
M src/v8natives.js View 1 chunk +20 lines, -2 lines 1 comment Download
A test/mjsunit/es6/symbol-tostringtag.js View 1 chunk +120 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ziyunfei
The CQ bit was checked by l446240525@gmail.com
6 years, 4 months ago (2014-08-11 00:19:04 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://v8-status.appspot.com/cq/L446240525@gmail.com/461453002/1
6 years, 4 months ago (2014-08-11 00:19:33 UTC) #2
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-11 00:19:35 UTC) #3
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
6 years, 4 months ago (2014-08-11 00:19:36 UTC) #4
ziyunfei
The CQ bit was unchecked by l446240525@gmail.com
6 years, 4 months ago (2014-08-11 00:19:47 UTC) #5
arv (Not doing code reviews)
This change as is will break Chrome and NodeJS (and other embedders of V8). The ...
6 years, 4 months ago (2014-08-11 14:40:40 UTC) #6
ziyunfei
6 years, 4 months ago (2014-08-11 16:17:54 UTC) #7
On 2014/08/11 14:40:40, arv wrote:
> This change as is will break Chrome and NodeJS (and other embedders of V8).
> 
> The problem is that the web depends on the O.p.toString behavior for host
> objects. For example:
> 
> assert(Object.prototype.toString.call(document.body) === '[object
> HTMLBodyElement]')
> 
> The embedder calls the V8 API FunctionTemplate::SetClassName which is then
used.
> With this change that class name is now ignored.
> 
> Then there is also: v8::Object::ObjectProtoToString which also needs to be
> updated:
>
https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/api.cc&l=3280
> 
> https://codereview.chromium.org/461453002/diff/1/src/v8natives.js
> File src/v8natives.js (right):
> 
> https://codereview.chromium.org/461453002/diff/1/src/v8natives.js#newcode226
> src/v8natives.js:226: if(reservedTags.indexOf(builtinTag) === -1){
> Can you change this to a switch? We do not want a linear search for all of
> these.

Many thanks for your review, Erik! But I'm a c++ noobie and don't know how to
change v8::Object::ObjectProtoToString properly, so I have to give up on this :(

Powered by Google App Engine
This is Rietveld 408576698