Commit 934360c8 authored by Marina Sakai's avatar Marina Sakai Committed by Commit Bot

Remove a macro-generated function for a private property of NamedConstructor

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

Bug: 715418
Change-Id: I2e56fbf6354643f7d81e15774bb8774e98048288
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895020Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Marina Sakai <marinasakai@google.com>
Cr-Commit-Position: refs/heads/master@{#711655}
parent 70374606
......@@ -782,8 +782,10 @@ void {{v8_class}}Constructor::NamedConstructorAttributeGetter(
per_context_data->ConstructorForType({{v8_class}}Constructor::GetWrapperTypeInfo());
// Set the prototype of named constructors to the regular constructor.
static const V8PrivateProperty::SymbolKey kPrivatePropertyInitialized;
auto private_property =
V8PrivateProperty::GetNamedConstructorInitialized(info.GetIsolate());
V8PrivateProperty::GetSymbol(
info.GetIsolate(), kPrivatePropertyInitialized);
v8::Local<v8::Context> current_context = info.GetIsolate()->GetCurrentContext();
v8::Local<v8::Value> private_value;
......
......@@ -482,8 +482,10 @@ void V8TestInterfaceConstructorConstructor::NamedConstructorAttributeGetter(
per_context_data->ConstructorForType(V8TestInterfaceConstructorConstructor::GetWrapperTypeInfo());
// Set the prototype of named constructors to the regular constructor.
static const V8PrivateProperty::SymbolKey kPrivatePropertyInitialized;
auto private_property =
V8PrivateProperty::GetNamedConstructorInitialized(info.GetIsolate());
V8PrivateProperty::GetSymbol(
info.GetIsolate(), kPrivatePropertyInitialized);
v8::Local<v8::Context> current_context = info.GetIsolate()->GetCurrentContext();
v8::Local<v8::Value> private_value;
......
......@@ -142,8 +142,10 @@ void V8TestInterfaceEventTargetConstructor::NamedConstructorAttributeGetter(
per_context_data->ConstructorForType(V8TestInterfaceEventTargetConstructor::GetWrapperTypeInfo());
// Set the prototype of named constructors to the regular constructor.
static const V8PrivateProperty::SymbolKey kPrivatePropertyInitialized;
auto private_property =
V8PrivateProperty::GetNamedConstructorInitialized(info.GetIsolate());
V8PrivateProperty::GetSymbol(
info.GetIsolate(), kPrivatePropertyInitialized);
v8::Local<v8::Context> current_context = info.GetIsolate()->GetCurrentContext();
v8::Local<v8::Value> private_value;
......
......@@ -213,8 +213,10 @@ void V8TestInterfaceNamedConstructorConstructor::NamedConstructorAttributeGetter
per_context_data->ConstructorForType(V8TestInterfaceNamedConstructorConstructor::GetWrapperTypeInfo());
// Set the prototype of named constructors to the regular constructor.
static const V8PrivateProperty::SymbolKey kPrivatePropertyInitialized;
auto private_property =
V8PrivateProperty::GetNamedConstructorInitialized(info.GetIsolate());
V8PrivateProperty::GetSymbol(
info.GetIsolate(), kPrivatePropertyInitialized);
v8::Local<v8::Context> current_context = info.GetIsolate()->GetCurrentContext();
v8::Local<v8::Value> private_value;
......
......@@ -151,8 +151,10 @@ void V8TestInterfaceNamedConstructor2Constructor::NamedConstructorAttributeGette
per_context_data->ConstructorForType(V8TestInterfaceNamedConstructor2Constructor::GetWrapperTypeInfo());
// Set the prototype of named constructors to the regular constructor.
static const V8PrivateProperty::SymbolKey kPrivatePropertyInitialized;
auto private_property =
V8PrivateProperty::GetNamedConstructorInitialized(info.GetIsolate());
V8PrivateProperty::GetSymbol(
info.GetIsolate(), kPrivatePropertyInitialized);
v8::Local<v8::Context> current_context = info.GetIsolate()->GetCurrentContext();
v8::Local<v8::Value> private_value;
......
......@@ -26,7 +26,6 @@ class ScriptWrappable;
#define V8_PRIVATE_PROPERTY_FOR_EACH(X) \
X(DOMException, Error) \
X(MessageEvent, CachedData) \
X(NamedConstructor, Initialized) \
// 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