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
......@@ -198,10 +198,11 @@ void ScriptPromisePropertyBase::CheckWrappers() {
V8PrivateProperty::Symbol ScriptPromisePropertyBase::PromiseSymbol() {
switch (name_) {
#define P(Interface, Name) \
case Name: \
return V8PrivateProperty::V8_PRIVATE_PROPERTY_GETTER_NAME( \
Interface, Name##Promise)(isolate_);
#define P(Interface, Name) \
case Name: \
static const V8PrivateProperty::SymbolKey kPrivateProperty##Name##Promise; \
return V8PrivateProperty::GetSymbol(isolate_, \
kPrivateProperty##Name##Promise);
SCRIPT_PROMISE_PROPERTIES(P)
......@@ -213,10 +214,12 @@ V8PrivateProperty::Symbol ScriptPromisePropertyBase::PromiseSymbol() {
V8PrivateProperty::Symbol ScriptPromisePropertyBase::ResolverSymbol() {
switch (name_) {
#define P(Interface, Name) \
case Name: \
return V8PrivateProperty::V8_PRIVATE_PROPERTY_GETTER_NAME( \
Interface, Name##Resolver)(isolate_);
#define P(Interface, Name) \
case Name: \
static const V8PrivateProperty::SymbolKey \
kPrivateProperty##Name##Resolver; \
return V8PrivateProperty::GetSymbol(isolate_, \
kPrivateProperty##Name##Resolver);
SCRIPT_PROMISE_PROPERTIES(P)
......
......@@ -28,8 +28,6 @@ class ScriptWrappable;
X(Global, Event) \
X(MessageEvent, CachedData) \
X(NamedConstructor, Initialized) \
SCRIPT_PROMISE_PROPERTIES(X, Promise) \
SCRIPT_PROMISE_PROPERTIES(X, Resolver)
// The getter's name for a private property.
#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