Commit a02c0767 authored by Hitoshi Yoshida's avatar Hitoshi Yoshida Committed by Commit Bot

IDL compiler: Fix compile errors in [CachedAttribute]

We didn't have non readonly attributes that have [CachedAttribute],
and unfortunately, generated code for that have problems.
This CL fixes the compile errors found in non readonly [CachedAttribute]
attributes.


Bug: 715418, 1025322
Change-Id: I5cd42c94adaa552521bc1f734d5afcbc832a122a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919521
Auto-Submit: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715888}
parent ca1213eb
......@@ -476,7 +476,7 @@ static void {{attribute.camel_case_name}}AttributeSetter{{world_suffix}}(
V8PrivateProperty::GetSymbol(
isolate,
kPrivateProperty{{attribute.camel_case_name}})
.DeleteProperty(holder, v8::Undefined(isolate));
.DeleteProperty(holder);
{% endif %}
{% endif %}{# attribute.is_put_forwards #}
{% endfilter %}{# format_remove_duplicates #}
......
......@@ -92,7 +92,7 @@ static void (*{{method.name}}MethodForPartialInterface)(const v8::FunctionCallba
{% for world_suffix in attribute.world_suffixes %}
{% if attribute.private_property_is_shared_between_getter_and_setter %}
// Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey k{{attribute.camel_case_name}};
static const V8PrivateProperty::SymbolKey kPrivateProperty{{attribute.camel_case_name}};
{% endif %}
{% if attribute.does_generate_getter %}
......
......@@ -1993,7 +1993,7 @@ static void ActivityLoggingSetterForAllWorldsLongAttributeAttributeSetter(
}
// Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey kCachedAttributeAnyAttribute;
static const V8PrivateProperty::SymbolKey kPrivatePropertyCachedAttributeAnyAttribute;
static void CachedAttributeAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
......@@ -2041,11 +2041,11 @@ static void CachedAttributeAnyAttributeAttributeSetter(
V8PrivateProperty::GetSymbol(
isolate,
kPrivatePropertyCachedAttributeAnyAttribute)
.DeleteProperty(holder, v8::Undefined(isolate));
.DeleteProperty(holder);
}
// Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey kCachedArrayAttribute;
static const V8PrivateProperty::SymbolKey kPrivatePropertyCachedArrayAttribute;
static void CachedArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
......@@ -2097,7 +2097,7 @@ static void CachedArrayAttributeAttributeSetter(
V8PrivateProperty::GetSymbol(
isolate,
kPrivatePropertyCachedArrayAttribute)
.DeleteProperty(holder, v8::Undefined(isolate));
.DeleteProperty(holder);
}
static void ReadonlyCachedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
......@@ -2129,7 +2129,7 @@ static void ReadonlyCachedAttributeAttributeGetter(const v8::FunctionCallbackInf
}
// Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey kCachedStringOrNoneAttribute;
static const V8PrivateProperty::SymbolKey kPrivatePropertyCachedStringOrNoneAttribute;
static void CachedStringOrNoneAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
......@@ -2179,7 +2179,7 @@ static void CachedStringOrNoneAttributeAttributeSetter(
V8PrivateProperty::GetSymbol(
isolate,
kPrivatePropertyCachedStringOrNoneAttribute)
.DeleteProperty(holder, v8::Undefined(isolate));
.DeleteProperty(holder);
}
static void CallWithExecutionContextAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
......@@ -3139,7 +3139,7 @@ static void RaisesExceptionTestInterfaceEmptyAttributeAttributeSetter(
}
// Define a private property key shared between getter and setter.
static const V8PrivateProperty::SymbolKey kCachedAttributeRaisesExceptionGetterAnyAttribute;
static const V8PrivateProperty::SymbolKey kPrivatePropertyCachedAttributeRaisesExceptionGetterAnyAttribute;
static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Local<v8::Object> holder = info.Holder();
......@@ -3194,7 +3194,7 @@ static void CachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(
V8PrivateProperty::GetSymbol(
isolate,
kPrivatePropertyCachedAttributeRaisesExceptionGetterAnyAttribute)
.DeleteProperty(holder, v8::Undefined(isolate));
.DeleteProperty(holder);
}
static void ReflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
......
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