Chromium Code Reviews| Index: Source/bindings/scripts/code_generator_v8.pm |
| diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm |
| index 8423affbf71574449d0dd76bfcccd34f2f8e8cea..21eab3657f4db78057db0389b9ba27bedf18e083 100644 |
| --- a/Source/bindings/scripts/code_generator_v8.pm |
| +++ b/Source/bindings/scripts/code_generator_v8.pm |
| @@ -1101,7 +1101,8 @@ sub GenerateHeaderNamedAndIndexedPropertyAccessors |
| my $hasCustomNamedDeleter = $namedDeleterFunction && $namedDeleterFunction->extendedAttributes->{"Custom"}; |
| my $namedEnumeratorFunction = $namedGetterFunction && !$namedGetterFunction->extendedAttributes->{"NotEnumerable"}; |
| - my $hasCustomNamedEnumerator = $namedGetterFunction && ExtendedAttributeContains($namedGetterFunction->extendedAttributes->{"Custom"}, "PropertyEnumerator"); |
| + my $hasCustomNamedEnumerator = $namedEnumeratorFunction && ExtendedAttributeContains($namedGetterFunction->extendedAttributes->{"Custom"}, "PropertyEnumerator"); |
|
Nils Barth (inactive)
2014/01/30 04:42:41
Typo fix: should ask for Enumerator, not Getter.
|
| + my $hasCustomNamedQuery = $namedEnumeratorFunction && ExtendedAttributeContains($namedGetterFunction->extendedAttributes->{"Custom"}, "PropertyQuery"); |
| if ($hasCustomIndexedGetter) { |
| $header{classPublic}->add(" static void indexedPropertyGetterCustom(uint32_t, const v8::PropertyCallbackInfo<v8::Value>&);\n"); |
| @@ -1123,13 +1124,16 @@ sub GenerateHeaderNamedAndIndexedPropertyAccessors |
| $header{classPublic}->add(" static void namedPropertySetterCustom(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);\n"); |
| } |
| + if ($hasCustomNamedQuery) { |
| + $header{classPublic}->add(" static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);\n"); |
| + } |
| + |
| if ($hasCustomNamedDeleter) { |
| $header{classPublic}->add(" static void namedPropertyDeleterCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean>&);\n"); |
| } |
| if ($hasCustomNamedEnumerator) { |
| $header{classPublic}->add(" static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::Array>&);\n"); |
| - $header{classPublic}->add(" static void namedPropertyQueryCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer>&);\n"); |
| } |
| } |
| @@ -3819,6 +3823,8 @@ sub GenerateImplementationNamedPropertyAccessors |
| my $v8ClassName = GetV8ClassName($interface); |
| my $namedGetterFunction = GetNamedGetterFunction($interface); |
| + my $namedEnumeratorFunction = $namedGetterFunction && !$namedGetterFunction->extendedAttributes->{"NotEnumerable"}; |
| + |
| if ($namedGetterFunction) { |
| # includes for return type even if custom |
| my $returnType = $namedGetterFunction->type; |
| @@ -3844,6 +3850,14 @@ sub GenerateImplementationNamedPropertyAccessors |
| GenerateImplementationNamedPropertySetterCallback($interface, $hasCustomNamedSetter); |
| } |
| + if ($namedEnumeratorFunction) { |
| + my $hasCustomNamedQuery = ExtendedAttributeContains($namedGetterFunction->extendedAttributes->{"Custom"}, "PropertyQuery"); |
| + if (!$hasCustomNamedQuery) { |
| + GenerateImplementationNamedPropertyQuery($interface); |
| + } |
| + GenerateImplementationNamedPropertyQueryCallback($interface, $hasCustomNamedQuery); |
| + } |
| + |
| my $namedDeleterFunction = GetNamedDeleterFunction($interface); |
| if ($namedDeleterFunction) { |
| my $hasCustomNamedDeleter = $namedDeleterFunction->extendedAttributes->{"Custom"}; |
| @@ -3853,14 +3867,9 @@ sub GenerateImplementationNamedPropertyAccessors |
| GenerateImplementationNamedPropertyDeleterCallback($interface, $hasCustomNamedDeleter); |
| } |
| - my $namedEnumeratorFunction = $namedGetterFunction && !$namedGetterFunction->extendedAttributes->{"NotEnumerable"}; |
| if ($namedEnumeratorFunction) { |
| my $hasCustomNamedEnumerator = ExtendedAttributeContains($namedGetterFunction->extendedAttributes->{"Custom"}, "PropertyEnumerator"); |
| if (!$hasCustomNamedEnumerator) { |
| - GenerateImplementationNamedPropertyQuery($interface); |
| - } |
| - GenerateImplementationNamedPropertyQueryCallback($interface, $hasCustomNamedEnumerator); |
| - if (!$hasCustomNamedEnumerator) { |
| GenerateImplementationNamedPropertyEnumerator($interface); |
| } |
| GenerateImplementationNamedPropertyEnumeratorCallback($interface, $hasCustomNamedEnumerator); |