[webkit-changes] [WebKit/WebKit] 9752ce: Support using Ref for IDLInterfaces in IDL records
Sam Weinig
noreply at github.com
Tue May 28 12:53:42 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9752ce405aad243af0d5ddcef0c04cf303fd82f2
https://github.com/WebKit/WebKit/commit/9752ce405aad243af0d5ddcef0c04cf303fd82f2
Author: Sam Weinig <weinig at apple.com>
Date: 2024-05-28 (Tue, 28 May 2024)
Changed paths:
M Source/WebCore/Modules/async-clipboard/ClipboardItem.cpp
M Source/WebCore/Modules/async-clipboard/ClipboardItem.h
M Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp
M Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h
M Source/WebCore/bindings/IDLTypes.h
M Source/WebCore/bindings/js/JSDOMConvertRecord.h
M Source/WebCore/testing/TypeConversions.h
Log Message:
-----------
Support using Ref for IDLInterfaces in IDL records
https://bugs.webkit.org/show_bug.cgi?id=274757
Reviewed by Darin Adler.
Continues effort to improve non-null hygiene by correctly mapping
WebIDL record values with non-optional IDL interface members to Ref<T>
rather than RefPtr<T>. For instance, the IDL record:
record<DOMString, Node>
previously would have mapped to:
Vector<KeyValuePair<String, RefPtr<Node>>>
and now maps to:
Vector<KeyValuePair<String, Ref<Node>>>
* Source/WebCore/bindings/IDLTypes.h:
- Switch to using InnerParameterType for the key/value types rather
than ImplementationType. This has no effect on the key, as strings
have the same ImplementationType and InnerParameterType, but is done
for consistency.
* Source/WebCore/Modules/async-clipboard/ClipboardItem.cpp:
(WebCore::ClipboardItem::ClipboardItem):
(WebCore::ClipboardItem::create):
* Source/WebCore/Modules/async-clipboard/ClipboardItem.h:
* Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemBindingsDataSource):
(WebCore::ClipboardItemBindingsDataSource::types const):
(WebCore::ClipboardItemBindingsDataSource::getType):
(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
* Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
* Source/WebCore/testing/TypeConversions.h:
(WebCore::TypeConversions::testNodeRecord const):
(WebCore::TypeConversions::setTestNodeRecord):
- Updates RefPtrs to Refs.
Canonical link: https://commits.webkit.org/279398@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list