Commit 60ecbcff authored by Marina Sakai's avatar Marina Sakai Committed by Commit Bot

Remove macro-generated functions for private properties for SCRIPT_PROMISE_PROPERTIES

This CL removes macro-generated fucntions for private properties of SCRIPT_PROMISE_PROPERTIES, and replaces them with the new API GetSymbol, which uses an instance address of V8PrivateProperty::SymbolKey as a key to get Symbol.

Bug: 715418
Change-Id: I0f511b0cf8286ac133e473d32b44620d9d799dc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893128Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Commit-Queue: Marina Sakai <marinasakai@google.com>
Cr-Commit-Position: refs/heads/master@{#711639}
parent 9a56734f
...@@ -200,8 +200,9 @@ V8PrivateProperty::Symbol ScriptPromisePropertyBase::PromiseSymbol() { ...@@ -200,8 +200,9 @@ V8PrivateProperty::Symbol ScriptPromisePropertyBase::PromiseSymbol() {
switch (name_) { switch (name_) {
#define P(Interface, Name) \ #define P(Interface, Name) \
case Name: \ case Name: \
return V8PrivateProperty::V8_PRIVATE_PROPERTY_GETTER_NAME( \ static const V8PrivateProperty::SymbolKey kPrivateProperty##Name##Promise; \
Interface, Name##Promise)(isolate_); return V8PrivateProperty::GetSymbol(isolate_, \
kPrivateProperty##Name##Promise);
SCRIPT_PROMISE_PROPERTIES(P) SCRIPT_PROMISE_PROPERTIES(P)
...@@ -215,8 +216,10 @@ V8PrivateProperty::Symbol ScriptPromisePropertyBase::ResolverSymbol() { ...@@ -215,8 +216,10 @@ V8PrivateProperty::Symbol ScriptPromisePropertyBase::ResolverSymbol() {
switch (name_) { switch (name_) {
#define P(Interface, Name) \ #define P(Interface, Name) \
case Name: \ case Name: \
return V8PrivateProperty::V8_PRIVATE_PROPERTY_GETTER_NAME( \ static const V8PrivateProperty::SymbolKey \
Interface, Name##Resolver)(isolate_); kPrivateProperty##Name##Resolver; \
return V8PrivateProperty::GetSymbol(isolate_, \
kPrivateProperty##Name##Resolver);
SCRIPT_PROMISE_PROPERTIES(P) SCRIPT_PROMISE_PROPERTIES(P)
......
...@@ -28,8 +28,6 @@ class ScriptWrappable; ...@@ -28,8 +28,6 @@ class ScriptWrappable;
X(Global, Event) \ X(Global, Event) \
X(MessageEvent, CachedData) \ X(MessageEvent, CachedData) \
X(NamedConstructor, Initialized) \ X(NamedConstructor, Initialized) \
SCRIPT_PROMISE_PROPERTIES(X, Promise) \
SCRIPT_PROMISE_PROPERTIES(X, Resolver)
// The getter's name for a private property. // The getter's name for a private property.
#define V8_PRIVATE_PROPERTY_GETTER_NAME(InterfaceName, PrivateKeyName) \ #define V8_PRIVATE_PROPERTY_GETTER_NAME(InterfaceName, PrivateKeyName) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment