-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate everything needed regarding a WebKit Secure Coding type (and move DDScannerResult over to the generated format) #21216
Generate everything needed regarding a WebKit Secure Coding type (and move DDScannerResult over to the generated format) #21216
Conversation
EWS run on previous version of this PR (hash 78d2ea1) |
78d2ea1
to
7b9cda9
Compare
EWS run on previous version of this PR (hash 7b9cda9) |
These ios-wk2-wpt failures seem unlikely to be from this patch. |
Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in
Outdated
Show resolved
Hide resolved
Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.h
Outdated
Show resolved
Hide resolved
7b9cda9
to
2bf351a
Compare
EWS run on previous version of this PR (hash 2bf351a) |
2bf351a
to
7c3dcf8
Compare
EWS run on current version of this PR (hash 7c3dcf8) |
The GTK API test failures can't be due to this patch. I'll keep a close eye after landing. |
β¦ move DDScannerResult over to the generated format) https://bugs.webkit.org/show_bug.cgi?id=265728 rdar://119079477 Reviewed by Alex Christensen. All WebKit Secure Coding types will follow the identical pattern of: 1 - Get property list dictionary 2 - Encode it 3 - Decode it 4 - Verify the decoded dictionary contents match the type 5 - Recreate the object with the property list Instead of writing all of that code over time after time, let's generate it. Given an Objective-C type and a description of its expected dictionary format, the generator now: 1 - Generates a CoreIPC wrapper for that type 2 - Generates the ArgumentCoders for that CoreIPC wrapper (including code that validates the dictionary format) 3 - Generates a description of the dictionary in SerializedTypeInfo 4 - Generates a description of the CoreIPC wrapper in SerializedTypeInfo All of the above was enough to move DDScannerResult over to this new format, and will greatly accelerate how quickly we can add new types. * Source/WebKit/DerivedSources-output.xcfilelist: * Source/WebKit/DerivedSources.make: * Source/WebKit/Scripts/generate-serializers.py: (SerializedType.__init__): (SerializedType.namespace_and_name): (SerializedType.name_declaration_for_serialized_type_info): (SerializedType.members_for_serialized_type_info): (SerializedType.cpp_type_from_struct_or_class): (SerializedType): (SerializedType.cpp_struct_or_class_name): (SerializedType.is_webkit_secure_coding_type): (SerializedType.wrapper_for_webkit_secure_coding_type): (generate_forward_declarations): (generate_impl): (generate_one_serialized_type_info): (output_sorted_headers): (generate_serialized_type_info): (parse_serialized_types): (generate_one_dictionary_member_validation): (generate_webkit_secure_coding_impl): (generate_webkit_secure_coding_impl.is): (generate_webkit_secure_coding_header): (main): (SerializedType.namespace_unless_wtf_and_name): Deleted. * Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp: * Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h: * Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp: Added. (WebKit::CoreIPCNSSomeFoundationType::CoreIPCNSSomeFoundationType): (WebKit::CoreIPCNSSomeFoundationType::isValidDictionary): (WebKit::CoreIPCNSSomeFoundationType::toID const): (WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult): (WebKit::CoreIPCDDScannerResult::isValidDictionary): (WebKit::CoreIPCDDScannerResult::toID const): * Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.h: Added. (WebKit::CoreIPCNSSomeFoundationType::CoreIPCNSSomeFoundationType): (WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult): * Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp: (WebKit::allSerializedTypes): * Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in: * Source/WebKit/Scripts/webkit/tests/WebKitPlatformGeneratedSerializers.cpp: (IPC::ArgumentCoder<WebKit::CoreIPCNSSomeFoundationType>::encode): (IPC::ArgumentCoder<WebKit::CoreIPCNSSomeFoundationType>::decode): (IPC::ArgumentCoder<WebKit::CoreIPCDDScannerResult>::encode): (IPC::ArgumentCoder<WebKit::CoreIPCDDScannerResult>::decode): * Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.h: Removed. * Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.mm: Removed. * Source/WebKit/Shared/Cocoa/CoreIPCDDScannerResult.serialization.in: * Source/WebKit/Shared/Cocoa/CoreIPCDictionary.h: * Source/WebKit/Shared/Cocoa/CoreIPCDictionary.mm: (WebKit::CoreIPCDictionary::CoreIPCDictionary): (WebKit::CoreIPCDictionary::keyHasValueOfType const): (WebKit::CoreIPCDictionary::keyIsMissingOrHasValueOfType const): (WebKit::CoreIPCDictionary::collectionValuesAreOfType const): (WebKit::CoreIPCDictionary::createNSDictionaryIfNeeded const): (WebKit::CoreIPCDictionary::toID const): * Source/WebKit/Shared/Cocoa/CoreIPCDictionary.serialization.in: * Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm: (WebKit::secureCodingValueFromID): (WebKit::valueFromID): * Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.h: * Source/WebKit/Shared/Cocoa/CoreIPCSecureCoding.mm: (WebKit::CoreIPCSecureCoding::conformsToWebKitSecureCoding): (WebKit::CoreIPCSecureCoding::conformsToSecureCoding): (WebKit::CoreIPCSecureCoding::CoreIPCSecureCoding): * Source/WebKit/Shared/Cocoa/CoreIPCTypes.h: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/271555@main
7c3dcf8
to
9bd720b
Compare
Committed 271555@main (9bd720b): https://commits.webkit.org/271555@main Reviewed commits have been landed. Closing PR #21216 and removing active labels. |
9bd720b
7c3dcf8