Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 10ce73287c2f5790bf83081440da55786d54ab6f https://github.com/WebKit/WebKit/commit/10ce73287c2f5790bf83081440da55786d54ab6f Author: Youenn Fablet <youe...@gmail.com> Date: 2022-11-25 (Fri, 25 Nov 2022)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/file-system-access/idlharness.https.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/file-system-access/idlharness.https.any.worker-expected.txt M LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt M LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt M Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.idl M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/bindings/js/ExtendedDOMIsoSubspaces.h M Source/WebCore/bindings/js/JSDOMAsyncIterator.h R Source/WebCore/bindings/js/JSFileSystemDirectoryHandleCustom.cpp R Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.cpp R Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.h M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm M Source/WebCore/bindings/scripts/IDLParser.pm M Source/WebCore/bindings/scripts/preprocess-idls.pl M Source/WebCore/bindings/scripts/test/BindingTestGlobalConstructors.idl A Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.cpp A Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.h A Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.cpp A Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.h M Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp M Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp M Source/WebCore/bindings/scripts/test/SupplementalDependencies.dep A Source/WebCore/bindings/scripts/test/TestAsyncIterable.idl A Source/WebCore/bindings/scripts/test/TestAsyncKeyValueIterable.idl Log Message: ----------- Add binding generator support for async iterable https://bugs.webkit.org/show_bug.cgi?id=231243 rdar://problem/84158224 Reviewed by Yusuke Suzuki. Refactor JSDOMAsyncIterator to better aligned with JSDOMIterator. We in particular remove the need to know the JS wrapper type. This allows to use more of the existing iterable binding generator support for async iterable. Move FileSystemDirectoryHandle async iterable from custom code to binding generator code. * LayoutTests/imported/w3c/web-platform-tests/file-system-access/idlharness.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/file-system-access/idlharness.https.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt: * Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.idl: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/ExtendedDOMIsoSubspaces.h: * Source/WebCore/bindings/js/JSDOMAsyncIterator.h: (WebCore::JSDOMAsyncIteratorBase::onPromiseSettledBody): (WebCore::JSDOMAsyncIteratorBase::onPromiseFulFilledBody): (WebCore::JSDOMAsyncIteratorBase::onPromiseRejectedBody): (WebCore::IteratorTraits>::destroy): (WebCore::IteratorTraits>::next): (WebCore::IteratorTraits>::runNextSteps): (WebCore::IteratorTraits>::getNextIterationResult): (WebCore::IteratorTraits>::settle): (WebCore::IteratorTraits>::createOnSettledFunction): (WebCore::IteratorTraits>::fulfill): (WebCore::IteratorTraits>::createOnFulfilledFunction): (WebCore::IteratorTraits>::reject): (WebCore::IteratorTraits>::createOnRejectedFunction): (WebCore::IteratorTraits>::finishCreation): (WebCore::JSIterator>::destroy): Deleted. (WebCore::JSIterator>::next): Deleted. (WebCore::JSIterator>::runNextSteps): Deleted. (WebCore::JSIterator>::getNextIterationResult): Deleted. (WebCore::JSIterator>::settle): Deleted. (WebCore::JSIterator>::fulfill): Deleted. (WebCore::JSIterator>::reject): Deleted. (WebCore::JSIterator>::finishCreation): Deleted. * Source/WebCore/bindings/js/JSFileSystemDirectoryHandleCustom.cpp: Removed. * Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.cpp: Removed. * Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.h: Removed. * Source/WebCore/bindings/scripts/CodeGeneratorJS.pm: (GenerateInterface): (AddAsyncIterableOperationIfNeeded): (AddIterableOperationIfNeeded): (addGenericIterableOperations): (GetFunctionName): (GeneratePropertiesHashTable): (InterfaceNeedsAsyncIterator): (GenerateImplementation): (IsValueIterableInterface): (IsKeyValueIterableInterface): (GenerateAsyncIterableDefinition): (GenerateIterableDefinition): (GenerateGenericIterableDefinition): (GetRuntimeEnabledStaticProperties): * Source/WebCore/bindings/scripts/IDLParser.pm: (parseAsyncIterable): * Source/WebCore/bindings/scripts/preprocess-idls.pl: (containsIterableInterfaceFromIDL): * Source/WebCore/bindings/scripts/test/BindingTestGlobalConstructors.idl: * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.cpp: Added. (WebCore::JSTestAsyncIterableDOMConstructor::prototypeForStructure): (WebCore::JSTestAsyncIterableDOMConstructor::initializeProperties): (WebCore::JSTestAsyncIterablePrototype::finishCreation): (WebCore::JSTestAsyncIterable::JSTestAsyncIterable): (WebCore::JSTestAsyncIterable::finishCreation): (WebCore::JSTestAsyncIterable::createPrototype): (WebCore::JSTestAsyncIterable::prototype): (WebCore::JSTestAsyncIterable::getConstructor): (WebCore::JSTestAsyncIterable::destroy): (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::jsTestAsyncIterablePrototypeFunction_entriesCaller): (WebCore::JSC_DEFINE_HOST_FUNCTION): (WebCore::jsTestAsyncIterablePrototypeFunction_keysCaller): (WebCore::jsTestAsyncIterablePrototypeFunction_valuesCaller): (WebCore::TestAsyncIterableIteratorTraits>::onPromiseSettled): (WebCore::TestAsyncIterableIteratorTraits>::onPromiseFulFilled): (WebCore::TestAsyncIterableIteratorTraits>::onPromiseRejected): (WebCore::JSTestAsyncIterable::subspaceForImpl): (WebCore::JSTestAsyncIterable::analyzeHeap): (WebCore::JSTestAsyncIterableOwner::isReachableFromOpaqueRoots): (WebCore::JSTestAsyncIterableOwner::finalize): (WebCore::toJSNewlyCreated): (WebCore::toJS): (WebCore::JSTestAsyncIterable::toWrapped): * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.h: Added. (WebCore::JSTestAsyncIterable::create): (WebCore::JSTestAsyncIterable::createStructure): (WebCore::JSTestAsyncIterable::subspaceFor): (WebCore::wrapperOwner): (WebCore::wrapperKey): (WebCore::toJS): (WebCore::toJSNewlyCreated): * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.cpp: Added. (WebCore::JSTestAsyncKeyValueIterableDOMConstructor::prototypeForStructure): (WebCore::JSTestAsyncKeyValueIterableDOMConstructor::initializeProperties): (WebCore::JSTestAsyncKeyValueIterablePrototype::finishCreation): (WebCore::JSTestAsyncKeyValueIterable::JSTestAsyncKeyValueIterable): (WebCore::JSTestAsyncKeyValueIterable::finishCreation): (WebCore::JSTestAsyncKeyValueIterable::createPrototype): (WebCore::JSTestAsyncKeyValueIterable::prototype): (WebCore::JSTestAsyncKeyValueIterable::getConstructor): (WebCore::JSTestAsyncKeyValueIterable::destroy): (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::jsTestAsyncKeyValueIterablePrototypeFunction_entriesCaller): (WebCore::JSC_DEFINE_HOST_FUNCTION): (WebCore::jsTestAsyncKeyValueIterablePrototypeFunction_keysCaller): (WebCore::jsTestAsyncKeyValueIterablePrototypeFunction_valuesCaller): (WebCore::TestAsyncKeyValueIterableIteratorTraits>::onPromiseSettled): (WebCore::TestAsyncKeyValueIterableIteratorTraits>::onPromiseFulFilled): (WebCore::TestAsyncKeyValueIterableIteratorTraits>::onPromiseRejected): (WebCore::JSTestAsyncKeyValueIterable::subspaceForImpl): (WebCore::JSTestAsyncKeyValueIterable::analyzeHeap): (WebCore::JSTestAsyncKeyValueIterableOwner::isReachableFromOpaqueRoots): (WebCore::JSTestAsyncKeyValueIterableOwner::finalize): (WebCore::toJSNewlyCreated): (WebCore::toJS): (WebCore::JSTestAsyncKeyValueIterable::toWrapped): * Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.h: Added. (WebCore::JSTestAsyncKeyValueIterable::create): (WebCore::JSTestAsyncKeyValueIterable::createStructure): (WebCore::JSTestAsyncKeyValueIterable::subspaceFor): (WebCore::wrapperOwner): (WebCore::wrapperKey): (WebCore::toJS): (WebCore::toJSNewlyCreated): * Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::jsTestGlobalObject_TestAsyncIterableConstructorGetter): (WebCore::JSC_DEFINE_CUSTOM_GETTER): (WebCore::jsTestGlobalObject_TestAsyncKeyValueIterableConstructorGetter): * Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::jsTestInterfacePrototypeFunction_entriesCaller): * Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::jsTestIterablePrototypeFunction_entriesCaller): * Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::jsTestNodePrototypeFunction_entriesCaller): * Source/WebCore/bindings/scripts/test/SupplementalDependencies.dep: * Source/WebCore/bindings/scripts/test/TestAsyncIterable.idl: Copied from Source/WebCore/bindings/js/ExtendedDOMIsoSubspaces.h. * Source/WebCore/bindings/scripts/test/TestAsyncKeyValueIterable.idl: Copied from Source/WebCore/bindings/js/ExtendedDOMIsoSubspaces.h. Canonical link: https://commits.webkit.org/257021@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes