Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7d9305e7f16995e3b8837fb159d56f32c182fc6d
https://github.com/WebKit/WebKit/commit/7d9305e7f16995e3b8837fb159d56f32c182fc6d
Author: Sam Weinig <[email protected]>
Date: 2026-01-19 (Mon, 19 Jan 2026)
Changed paths:
M Source/WTF/WTF.xcodeproj/project.pbxproj
M Source/WTF/wtf/CMakeLists.txt
A Source/WTF/wtf/IsIncreasing.h
M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
M Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestDictionary.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryNoToNative.cpp
M
Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestEmptyDictionary.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
M Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp
M Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp
M Source/WebCore/bindings/scripts/test/TestObj.idl
M Source/WebKit/Scripts/generate-serializers.py
Log Message:
-----------
Add static checks that dictionary member order in the IDL matches the native
dictionaries
https://bugs.webkit.org/show_bug.cgi?id=305786
Reviewed by Darin Adler.
Factors out the member ordering checks from the CoreIPC generator
into a new WTF file, IsIncreasing.h, renaming it from `MembersInCorrectOrder`
(since "correct" is a bit subjective, and it can work with any numbers).
Adds checks for IDL dictionaries that don't have the extended
attribute `LegacyNativeDictionaryRequiredInterfaceNullability`
that the native dictionary is an aggregate and that the relative
order of members matches the IDL definition. Compilers with
"-Werror=missing-field-initializers" will provide the final check,
ensuring that that all fields get initialized, proving that
relative order check was exhaustive.
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/IsIncreasing.h: Added.
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
* Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryNoToNative.cpp:
*
Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestEmptyDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* Source/WebCore/bindings/scripts/test/TestObj.idl:
* Source/WebKit/Scripts/generate-serializers.py:
Canonical link: https://commits.webkit.org/305840@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications