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

Issue 341453003: Support symbol-named properties in API (Closed)

Created:
6 years, 6 months ago by wingo
Modified:
6 years, 4 months ago
Reviewers:
dcarney, rossberg
CC:
v8-dev, Paweł Hajdan Jr.
Visibility:
Public.

Description

Support symbol-named properties in API Add new "Name" type to API that is a supertype of Symbol and String. Object::SetDeclaredAccessor, Object::SetAccessorProperty, Template::Set, Template::SetAccessorProperty, and Template::SetDeclaredAccessor now take a Name as the property name instead of a String. Add Object::SetAccessor, Template::SetNativeDataProperty, and ObjectTemplate::SetAccessor overloads that can define accessors for symbol-named properties. ObjectTemplate::SetGenericNamedPropertyHandler is a new version of ObjectTemplate::SetNamedPropertyHandler that can intercept any Name property access, not just access to String properties. Eventually we will deprecate and remove ObjectTemplate::SetNamedPropertyHandler, then rename ObjectTemplate::SetGenericNamedPropertyHandler back to ObjectTemplate::SetNamedPropertyHandler. R=rossberg@chromium.org BUG=v8:3394 TEST=cctest/test-api/TestSymbolProperties LOG=Y

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -104 lines) Patch
M include/v8.h View 12 chunks +172 lines, -9 lines 0 comments Download
M src/api.h View 3 chunks +4 lines, -0 lines 0 comments Download
M src/api.cc View 17 chunks +103 lines, -24 lines 0 comments Download
M src/arguments.h View 3 chunks +18 lines, -0 lines 0 comments Download
M src/objects.h View 2 chunks +8 lines, -1 line 0 comments Download
M src/objects.cc View 10 chunks +65 lines, -53 lines 0 comments Download
M src/objects-debug.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects-printer.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/stub-cache.cc View 2 chunks +21 lines, -15 lines 0 comments Download
M test/cctest/test-api.cc View 9 chunks +159 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
wingo
6 years, 6 months ago (2014-06-17 08:01:53 UTC) #1
wingo
6 years, 4 months ago (2014-08-12 12:13:45 UTC) #2
Message was sent while issue was closed.
The accessor part of this is superceded by
https://codereview.chromium.org/459413002/.  I'll post the interceptor part
later, if the accessor part goes through.

Powered by Google App Engine
This is Rietveld 408576698