| Index: Source/bindings/scripts/CodeGeneratorV8.pm
|
| diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm
|
| index 9972dafcbaf43964df84aa05a003024cb324896e..ee97b640dde5f07c5ae8883e4394c05123b7d394 100644
|
| --- a/Source/bindings/scripts/CodeGeneratorV8.pm
|
| +++ b/Source/bindings/scripts/CodeGeneratorV8.pm
|
| @@ -3193,7 +3193,6 @@ sub GenerateImplementationIndexedPropertyAccessors
|
| my $indexedEnumeratorFunction = $indexedGetterFunction;
|
| $indexedEnumeratorFunction = 0 if $indexedGetterFunction && $indexedGetterFunction->extendedAttributes->{"NotEnumerable"};
|
|
|
| - # FIXME: Support generated named query bindings.
|
| my $indexedQueryFunction = 0;
|
| # If there is an enumerator, there MUST be a query method to properly communicate property attributes.
|
| my $hasQuery = $indexedQueryFunction || $indexedEnumeratorFunction;
|
| @@ -3351,10 +3350,12 @@ sub GenerateImplementationNamedPropertyAccessors
|
| GenerateImplementationNamedPropertyEnumerator($interface);
|
| }
|
|
|
| - # FIXME: Support generated named query bindings.
|
| - my $namedQueryFunction = 0;
|
| # If there is an enumerator, there MUST be a query method to properly communicate property attributes.
|
| - my $hasQuery = $namedQueryFunction || $namedEnumeratorFunction;
|
| + my $hasQuery = $namedEnumeratorFunction;
|
| + my $hasCustomNamedQuery = $hasCustomNamedEnumerator;
|
| + if ($hasQuery && !$hasCustomNamedQuery) {
|
| + GenerateImplementationNamedPropertyQuery($interface);
|
| + }
|
|
|
| my $subCode = "";
|
| if ($namedGetterFunction || $namedSetterFunction || $namedDeleterFunction || $namedEnumeratorFunction || $hasQuery) {
|
| @@ -3643,6 +3644,31 @@ void ${v8ClassName}::namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::
|
| END
|
| }
|
|
|
| +sub GenerateImplementationNamedPropertyQuery
|
| +{
|
| + my $interface = shift;
|
| + my $implClassName = GetImplName($interface);
|
| + my $v8ClassName = GetV8ClassName($interface);
|
| +
|
| + $implementation{nameSpaceWebCore}->add(<<END);
|
| +void ${v8ClassName}::namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
|
| +{
|
| + ${implClassName}* collection = toNative(info.Holder());
|
| + AtomicString propertyName = toWebCoreAtomicString(name);
|
| + ExceptionCode ec = 0;
|
| + bool result = collection->namedPropertyQuery(propertyName, ec);
|
| + if (ec) {
|
| + setDOMException(ec, info.GetIsolate());
|
| + return;
|
| + }
|
| + if (!result)
|
| + return;
|
| + v8SetReturnValueInt(info, v8::None);
|
| +}
|
| +
|
| +END
|
| +}
|
| +
|
| sub GenerateImplementationLegacyCall
|
| {
|
| my $interface = shift;
|
|
|