Commit 7c275cad authored by Marina Sakai's avatar Marina Sakai Committed by Commit Bot

Rename all the const variables of V8PrivateProperty::SymbolKey

The name of const variables should be "k{{camel case name}}".
This CL follows the style.


Bug: 715418
Change-Id: I54c37152cebee1a863fceabb685480cdf08f93f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893603Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Marina Sakai <marinasakai@google.com>
Cr-Commit-Position: refs/heads/master@{#711664}
parent dfd0e0a0
...@@ -146,7 +146,6 @@ def attribute_context(interface, attribute, interfaces, component_info): ...@@ -146,7 +146,6 @@ def attribute_context(interface, attribute, interfaces, component_info):
use_private_property_in_getter and use_private_property_in_getter and
use_private_property_in_setter use_private_property_in_setter
) )
private_property_key_name = create_private_property_key_name(attribute)
does_use_private_property = ( does_use_private_property = (
use_private_property_in_getter or use_private_property_in_getter or
...@@ -240,7 +239,6 @@ def attribute_context(interface, attribute, interfaces, component_info): ...@@ -240,7 +239,6 @@ def attribute_context(interface, attribute, interfaces, component_info):
'origin_trial_feature_name': 'origin_trial_feature_name':
v8_utilities.origin_trial_feature_name(attribute, runtime_features), # [RuntimeEnabled] for origin trial v8_utilities.origin_trial_feature_name(attribute, runtime_features), # [RuntimeEnabled] for origin trial
'private_property_is_shared_between_getter_and_setter': private_property_is_shared_between_getter_and_setter, 'private_property_is_shared_between_getter_and_setter': private_property_is_shared_between_getter_and_setter,
'private_property_key_name': private_property_key_name,
'property_attributes': property_attributes(interface, attribute), 'property_attributes': property_attributes(interface, attribute),
'reflect_empty': extended_attributes.get('ReflectEmpty'), 'reflect_empty': extended_attributes.get('ReflectEmpty'),
'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''),
...@@ -277,10 +275,6 @@ def attribute_context(interface, attribute, interfaces, component_info): ...@@ -277,10 +275,6 @@ def attribute_context(interface, attribute, interfaces, component_info):
return context return context
def create_private_property_key_name(attribute):
return NameStyleConverter(attribute.name + '_key').to_snake_case()
def runtime_call_stats_context(interface, attribute, context): def runtime_call_stats_context(interface, attribute, context):
includes.add('platform/bindings/runtime_call_stats.h') includes.add('platform/bindings/runtime_call_stats.h')
generic_counter_name = 'Blink_' + v8_utilities.cpp_name(interface) + '_' + attribute.name generic_counter_name = 'Blink_' + v8_utilities.cpp_name(interface) + '_' + attribute.name
......
...@@ -41,9 +41,9 @@ const v8::FunctionCallbackInfo<v8::Value>& info ...@@ -41,9 +41,9 @@ const v8::FunctionCallbackInfo<v8::Value>& info
{% if attribute.is_save_same_object %} {% if attribute.is_save_same_object %}
// [SaveSameObject] // [SaveSameObject]
static const V8PrivateProperty::SymbolKey save_same_object_key; static const V8PrivateProperty::SymbolKey kSaveSameObjectKey;
auto private_same_object = auto private_same_object =
V8PrivateProperty::GetSymbol(info.GetIsolate(), save_same_object_key); V8PrivateProperty::GetSymbol(info.GetIsolate(), kSaveSameObjectKey);
{ {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (private_same_object.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (private_same_object.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -76,12 +76,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info ...@@ -76,12 +76,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info
V8PrivateProperty::GetHistoryStateSymbol(info.GetIsolate()); V8PrivateProperty::GetHistoryStateSymbol(info.GetIsolate());
{% else %} {% else %}
{% if not attribute.private_property_is_shared_between_getter_and_setter %} {% if not attribute.private_property_is_shared_between_getter_and_setter %}
static const V8PrivateProperty::SymbolKey {{attribute.private_property_key_name}}; static const V8PrivateProperty::SymbolKey kPrivateProperty{{attribute.camel_case_name}};
{% endif %} {% endif %}
V8PrivateProperty::Symbol property_symbol = V8PrivateProperty::Symbol property_symbol =
V8PrivateProperty::GetSymbol(info.GetIsolate(), V8PrivateProperty::GetSymbol(info.GetIsolate(),
{{attribute.private_property_key_name}}); kPrivateProperty{{attribute.camel_case_name}});
{% endif %} {% endif %}
if (!static_cast<const {{cpp_class}}*>(impl)->{{attribute.cached_attribute_validation_method}}()) { if (!static_cast<const {{cpp_class}}*>(impl)->{{attribute.cached_attribute_validation_method}}()) {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
...@@ -182,8 +182,8 @@ const v8::FunctionCallbackInfo<v8::Value>& info ...@@ -182,8 +182,8 @@ const v8::FunctionCallbackInfo<v8::Value>& info
if ({{attribute.cpp_value}} && DOMDataStore::SetReturnValue{{world_suffix}}(info.GetReturnValue(), {{attribute.cpp_value_to_script_wrappable}})) if ({{attribute.cpp_value}} && DOMDataStore::SetReturnValue{{world_suffix}}(info.GetReturnValue(), {{attribute.cpp_value_to_script_wrappable}}))
return; return;
v8::Local<v8::Value> v8_value(ToV8({{attribute.cpp_value_to_script_wrappable}}, holder, info.GetIsolate())); v8::Local<v8::Value> v8_value(ToV8({{attribute.cpp_value_to_script_wrappable}}, holder, info.GetIsolate()));
static const V8PrivateProperty::SymbolKey keep_alive_key; static const V8PrivateProperty::SymbolKey kKeepAliveKey;
V8PrivateProperty::GetSymbol(info.GetIsolate(), keep_alive_key) V8PrivateProperty::GetSymbol(info.GetIsolate(), kKeepAliveKey)
.Set(holder, v8_value); .Set(holder, v8_value);
{% endif %} {% endif %}
...@@ -472,7 +472,7 @@ static void {{attribute.camel_case_name}}AttributeSetter{{world_suffix}}( ...@@ -472,7 +472,7 @@ static void {{attribute.camel_case_name}}AttributeSetter{{world_suffix}}(
// Invalidate the cached value. // Invalidate the cached value.
V8PrivateProperty::GetSymbol( V8PrivateProperty::GetSymbol(
isolate, isolate,
{{attribute.private_property_key_name}}) kPrivateProperty{{attribute.camel_case_name}})
.DeleteProperty(holder, v8::Undefined(isolate)); .DeleteProperty(holder, v8::Undefined(isolate));
{% endif %} {% endif %}
{% endif %}{# attribute.is_put_forwards #} {% endif %}{# attribute.is_put_forwards #}
......
...@@ -92,7 +92,7 @@ static void (*{{method.name}}MethodForPartialInterface)(const v8::FunctionCallba ...@@ -92,7 +92,7 @@ static void (*{{method.name}}MethodForPartialInterface)(const v8::FunctionCallba
{% for world_suffix in attribute.world_suffixes %} {% for world_suffix in attribute.world_suffixes %}
{% if attribute.private_property_is_shared_between_getter_and_setter %} {% if attribute.private_property_is_shared_between_getter_and_setter %}
// Define a private property key shared between getter and setter. // Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey {{attribute.private_property_key_name}}; static const V8PrivateProperty::SymbolKey k{{attribute.camel_case_name}};
{% endif %} {% endif %}
{% if attribute.does_generate_getter %} {% if attribute.does_generate_getter %}
......
...@@ -166,8 +166,8 @@ static void ReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Functio ...@@ -166,8 +166,8 @@ static void ReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Functio
if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value)) if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value))
return; return;
v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate())); v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate()));
static const V8PrivateProperty::SymbolKey keep_alive_key; static const V8PrivateProperty::SymbolKey kKeepAliveKey;
V8PrivateProperty::GetSymbol(info.GetIsolate(), keep_alive_key) V8PrivateProperty::GetSymbol(info.GetIsolate(), kKeepAliveKey)
.Set(holder, v8_value); .Set(holder, v8_value);
V8SetReturnValue(info, v8_value); V8SetReturnValue(info, v8_value);
...@@ -1992,7 +1992,7 @@ static void ActivityLoggingSetterForAllWorldsLongAttributeAttributeSetter( ...@@ -1992,7 +1992,7 @@ static void ActivityLoggingSetterForAllWorldsLongAttributeAttributeSetter(
} }
// Define a private property key shared between getter and setter. // Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey cached_attribute_any_attribute_key; static const V8PrivateProperty::SymbolKey kCachedAttributeAnyAttribute;
static void CachedAttributeAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { static void CachedAttributeAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder(); v8::Local<v8::Object> holder = info.Holder();
...@@ -2002,7 +2002,7 @@ static void CachedAttributeAnyAttributeAttributeGetter(const v8::FunctionCallbac ...@@ -2002,7 +2002,7 @@ static void CachedAttributeAnyAttributeAttributeGetter(const v8::FunctionCallbac
// [CachedAttribute] // [CachedAttribute]
V8PrivateProperty::Symbol property_symbol = V8PrivateProperty::Symbol property_symbol =
V8PrivateProperty::GetSymbol(info.GetIsolate(), V8PrivateProperty::GetSymbol(info.GetIsolate(),
cached_attribute_any_attribute_key); kPrivatePropertyCachedAttributeAnyAttribute);
if (!static_cast<const TestObject*>(impl)->isValueDirty()) { if (!static_cast<const TestObject*>(impl)->isValueDirty()) {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -2039,12 +2039,12 @@ static void CachedAttributeAnyAttributeAttributeSetter( ...@@ -2039,12 +2039,12 @@ static void CachedAttributeAnyAttributeAttributeSetter(
// Invalidate the cached value. // Invalidate the cached value.
V8PrivateProperty::GetSymbol( V8PrivateProperty::GetSymbol(
isolate, isolate,
cached_attribute_any_attribute_key) kPrivatePropertyCachedAttributeAnyAttribute)
.DeleteProperty(holder, v8::Undefined(isolate)); .DeleteProperty(holder, v8::Undefined(isolate));
} }
// Define a private property key shared between getter and setter. // Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey cached_array_attribute_key; static const V8PrivateProperty::SymbolKey kCachedArrayAttribute;
static void CachedArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { static void CachedArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder(); v8::Local<v8::Object> holder = info.Holder();
...@@ -2054,7 +2054,7 @@ static void CachedArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v ...@@ -2054,7 +2054,7 @@ static void CachedArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v
// [CachedAttribute] // [CachedAttribute]
V8PrivateProperty::Symbol property_symbol = V8PrivateProperty::Symbol property_symbol =
V8PrivateProperty::GetSymbol(info.GetIsolate(), V8PrivateProperty::GetSymbol(info.GetIsolate(),
cached_array_attribute_key); kPrivatePropertyCachedArrayAttribute);
if (!static_cast<const TestObject*>(impl)->isFrozenArrayDirty()) { if (!static_cast<const TestObject*>(impl)->isFrozenArrayDirty()) {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -2095,7 +2095,7 @@ static void CachedArrayAttributeAttributeSetter( ...@@ -2095,7 +2095,7 @@ static void CachedArrayAttributeAttributeSetter(
// Invalidate the cached value. // Invalidate the cached value.
V8PrivateProperty::GetSymbol( V8PrivateProperty::GetSymbol(
isolate, isolate,
cached_array_attribute_key) kPrivatePropertyCachedArrayAttribute)
.DeleteProperty(holder, v8::Undefined(isolate)); .DeleteProperty(holder, v8::Undefined(isolate));
} }
...@@ -2105,11 +2105,11 @@ static void ReadonlyCachedAttributeAttributeGetter(const v8::FunctionCallbackInf ...@@ -2105,11 +2105,11 @@ static void ReadonlyCachedAttributeAttributeGetter(const v8::FunctionCallbackInf
TestObject* impl = V8TestObject::ToImpl(holder); TestObject* impl = V8TestObject::ToImpl(holder);
// [CachedAttribute] // [CachedAttribute]
static const V8PrivateProperty::SymbolKey readonly_cached_attribute_key; static const V8PrivateProperty::SymbolKey kPrivatePropertyReadonlyCachedAttribute;
V8PrivateProperty::Symbol property_symbol = V8PrivateProperty::Symbol property_symbol =
V8PrivateProperty::GetSymbol(info.GetIsolate(), V8PrivateProperty::GetSymbol(info.GetIsolate(),
readonly_cached_attribute_key); kPrivatePropertyReadonlyCachedAttribute);
if (!static_cast<const TestObject*>(impl)->isStringDirty()) { if (!static_cast<const TestObject*>(impl)->isStringDirty()) {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -2128,7 +2128,7 @@ static void ReadonlyCachedAttributeAttributeGetter(const v8::FunctionCallbackInf ...@@ -2128,7 +2128,7 @@ static void ReadonlyCachedAttributeAttributeGetter(const v8::FunctionCallbackInf
} }
// Define a private property key shared between getter and setter. // Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey cached_string_or_none_attribute_key; static const V8PrivateProperty::SymbolKey kCachedStringOrNoneAttribute;
static void CachedStringOrNoneAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { static void CachedStringOrNoneAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder(); v8::Local<v8::Object> holder = info.Holder();
...@@ -2138,7 +2138,7 @@ static void CachedStringOrNoneAttributeAttributeGetter(const v8::FunctionCallbac ...@@ -2138,7 +2138,7 @@ static void CachedStringOrNoneAttributeAttributeGetter(const v8::FunctionCallbac
// [CachedAttribute] // [CachedAttribute]
V8PrivateProperty::Symbol property_symbol = V8PrivateProperty::Symbol property_symbol =
V8PrivateProperty::GetSymbol(info.GetIsolate(), V8PrivateProperty::GetSymbol(info.GetIsolate(),
cached_string_or_none_attribute_key); kPrivatePropertyCachedStringOrNoneAttribute);
if (!static_cast<const TestObject*>(impl)->isStringDirty()) { if (!static_cast<const TestObject*>(impl)->isStringDirty()) {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -2177,7 +2177,7 @@ static void CachedStringOrNoneAttributeAttributeSetter( ...@@ -2177,7 +2177,7 @@ static void CachedStringOrNoneAttributeAttributeSetter(
// Invalidate the cached value. // Invalidate the cached value.
V8PrivateProperty::GetSymbol( V8PrivateProperty::GetSymbol(
isolate, isolate,
cached_string_or_none_attribute_key) kPrivatePropertyCachedStringOrNoneAttribute)
.DeleteProperty(holder, v8::Undefined(isolate)); .DeleteProperty(holder, v8::Undefined(isolate));
} }
...@@ -2522,8 +2522,8 @@ static void PerWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c ...@@ -2522,8 +2522,8 @@ static void PerWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value)) if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value))
return; return;
v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate())); v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate()));
static const V8PrivateProperty::SymbolKey keep_alive_key; static const V8PrivateProperty::SymbolKey kKeepAliveKey;
V8PrivateProperty::GetSymbol(info.GetIsolate(), keep_alive_key) V8PrivateProperty::GetSymbol(info.GetIsolate(), kKeepAliveKey)
.Set(holder, v8_value); .Set(holder, v8_value);
V8SetReturnValue(info, v8_value); V8SetReturnValue(info, v8_value);
...@@ -2541,8 +2541,8 @@ static void PerWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo ...@@ -2541,8 +2541,8 @@ static void PerWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
if (cpp_value && DOMDataStore::SetReturnValueForMainWorld(info.GetReturnValue(), cpp_value)) if (cpp_value && DOMDataStore::SetReturnValueForMainWorld(info.GetReturnValue(), cpp_value))
return; return;
v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate())); v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate()));
static const V8PrivateProperty::SymbolKey keep_alive_key; static const V8PrivateProperty::SymbolKey kKeepAliveKey;
V8PrivateProperty::GetSymbol(info.GetIsolate(), keep_alive_key) V8PrivateProperty::GetSymbol(info.GetIsolate(), kKeepAliveKey)
.Set(holder, v8_value); .Set(holder, v8_value);
V8SetReturnValue(info, v8_value); V8SetReturnValue(info, v8_value);
...@@ -3138,7 +3138,7 @@ static void RaisesExceptionTestInterfaceEmptyAttributeAttributeSetter( ...@@ -3138,7 +3138,7 @@ static void RaisesExceptionTestInterfaceEmptyAttributeAttributeSetter(
} }
// Define a private property key shared between getter and setter. // Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey cached_attribute_raises_exception_getter_any_attribute_key; static const V8PrivateProperty::SymbolKey kCachedAttributeRaisesExceptionGetterAnyAttribute;
static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder(); v8::Local<v8::Object> holder = info.Holder();
...@@ -3148,7 +3148,7 @@ static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons ...@@ -3148,7 +3148,7 @@ static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons
// [CachedAttribute] // [CachedAttribute]
V8PrivateProperty::Symbol property_symbol = V8PrivateProperty::Symbol property_symbol =
V8PrivateProperty::GetSymbol(info.GetIsolate(), V8PrivateProperty::GetSymbol(info.GetIsolate(),
cached_attribute_raises_exception_getter_any_attribute_key); kPrivatePropertyCachedAttributeRaisesExceptionGetterAnyAttribute);
if (!static_cast<const TestObject*>(impl)->isValueDirty()) { if (!static_cast<const TestObject*>(impl)->isValueDirty()) {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (property_symbol.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -3192,7 +3192,7 @@ static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter( ...@@ -3192,7 +3192,7 @@ static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(
// Invalidate the cached value. // Invalidate the cached value.
V8PrivateProperty::GetSymbol( V8PrivateProperty::GetSymbol(
isolate, isolate,
cached_attribute_raises_exception_getter_any_attribute_key) kPrivatePropertyCachedAttributeRaisesExceptionGetterAnyAttribute)
.DeleteProperty(holder, v8::Undefined(isolate)); .DeleteProperty(holder, v8::Undefined(isolate));
} }
...@@ -4105,8 +4105,8 @@ static void SameObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8 ...@@ -4105,8 +4105,8 @@ static void SameObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8
if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value)) if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value))
return; return;
v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate())); v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate()));
static const V8PrivateProperty::SymbolKey keep_alive_key; static const V8PrivateProperty::SymbolKey kKeepAliveKey;
V8PrivateProperty::GetSymbol(info.GetIsolate(), keep_alive_key) V8PrivateProperty::GetSymbol(info.GetIsolate(), kKeepAliveKey)
.Set(holder, v8_value); .Set(holder, v8_value);
V8SetReturnValue(info, v8_value); V8SetReturnValue(info, v8_value);
...@@ -4116,9 +4116,9 @@ static void SaveSameObjectAttributeAttributeGetter(const v8::FunctionCallbackInf ...@@ -4116,9 +4116,9 @@ static void SaveSameObjectAttributeAttributeGetter(const v8::FunctionCallbackInf
v8::Local<v8::Object> holder = info.Holder(); v8::Local<v8::Object> holder = info.Holder();
// [SaveSameObject] // [SaveSameObject]
static const V8PrivateProperty::SymbolKey save_same_object_key; static const V8PrivateProperty::SymbolKey kSaveSameObjectKey;
auto private_same_object = auto private_same_object =
V8PrivateProperty::GetSymbol(info.GetIsolate(), save_same_object_key); V8PrivateProperty::GetSymbol(info.GetIsolate(), kSaveSameObjectKey);
{ {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (private_same_object.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (private_same_object.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
...@@ -4136,8 +4136,8 @@ static void SaveSameObjectAttributeAttributeGetter(const v8::FunctionCallbackInf ...@@ -4136,8 +4136,8 @@ static void SaveSameObjectAttributeAttributeGetter(const v8::FunctionCallbackInf
if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value)) if (cpp_value && DOMDataStore::SetReturnValue(info.GetReturnValue(), cpp_value))
return; return;
v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate())); v8::Local<v8::Value> v8_value(ToV8(cpp_value, holder, info.GetIsolate()));
static const V8PrivateProperty::SymbolKey keep_alive_key; static const V8PrivateProperty::SymbolKey kKeepAliveKey;
V8PrivateProperty::GetSymbol(info.GetIsolate(), keep_alive_key) V8PrivateProperty::GetSymbol(info.GetIsolate(), kKeepAliveKey)
.Set(holder, v8_value); .Set(holder, v8_value);
V8SetReturnValue(info, v8_value); V8SetReturnValue(info, v8_value);
...@@ -4150,9 +4150,9 @@ static void StaticSaveSameObjectAttributeAttributeGetter(const v8::FunctionCallb ...@@ -4150,9 +4150,9 @@ static void StaticSaveSameObjectAttributeAttributeGetter(const v8::FunctionCallb
v8::Local<v8::Object> holder = info.Holder(); v8::Local<v8::Object> holder = info.Holder();
// [SaveSameObject] // [SaveSameObject]
static const V8PrivateProperty::SymbolKey save_same_object_key; static const V8PrivateProperty::SymbolKey kSaveSameObjectKey;
auto private_same_object = auto private_same_object =
V8PrivateProperty::GetSymbol(info.GetIsolate(), save_same_object_key); V8PrivateProperty::GetSymbol(info.GetIsolate(), kSaveSameObjectKey);
{ {
v8::Local<v8::Value> v8_value; v8::Local<v8::Value> v8_value;
if (private_same_object.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) { if (private_same_object.GetOrUndefined(holder).ToLocal(&v8_value) && !v8_value->IsUndefined()) {
......
...@@ -152,8 +152,8 @@ class PLATFORM_EXPORT V8PrivateProperty { ...@@ -152,8 +152,8 @@ class PLATFORM_EXPORT V8PrivateProperty {
// This is a hack for PopStateEvent to get the same private property of // This is a hack for PopStateEvent to get the same private property of
// History, named State. // History, named State.
static Symbol GetHistoryStateSymbol(v8::Isolate* isolate) { static Symbol GetHistoryStateSymbol(v8::Isolate* isolate) {
static const SymbolKey private_property_key; static const SymbolKey kPrivatePropertyKey;
return GetSymbol(isolate, private_property_key); return GetSymbol(isolate, kPrivatePropertyKey);
} }
// Returns a Symbol to access a private property. Symbol instances from same // Returns a Symbol to access a private property. Symbol instances from same
......
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