[webkit-changes] [WebKit/WebKit] 3eb7fa: Restrict types serialized in an NSDictionary and N...

Alex Christensen noreply at github.com
Sat Feb 17 16:33:12 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3eb7fa3d34df30dc1066f15dd1f6137865df49b8
      https://github.com/WebKit/WebKit/commit/3eb7fa3d34df30dc1066f15dd1f6137865df49b8
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-02-17 (Sat, 17 Feb 2024)

  Changed paths:
    M Source/WebKit/Scripts/generate-serializers.py
    M Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp
    M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h
    M Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
    M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h
    M Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm

  Log Message:
  -----------
  Restrict types serialized in an NSDictionary and NSArray
https://bugs.webkit.org/show_bug.cgi?id=269613
rdar://122817546

Reviewed by Brady Eidson.

When we used CoreIPCDictionary for serialization of all types that used WKKeyedCoder,
when we increased the number of types that used WKKeyedCoder we increased the number of
types that could be serialized in any NSDictionary or NSArray.

Now that we are using generated structures for serialization of types using WKKeyedCoder,
we can separate the coders and bring the number of types allowed in NSDictionary and NSArray
back down.

* Source/WebKit/Scripts/generate-serializers.py:
(MemberVariable.type_check):
(generate_webkit_secure_coding_impl):
* Source/WebKit/Scripts/webkit/tests/GeneratedWebKitSecureCoding.cpp:
(WebKit::CoreIPCAVOutputContext::CoreIPCAVOutputContext):
(WebKit::CoreIPCNSSomeFoundationType::CoreIPCNSSomeFoundationType):
(WebKit::CoreIPCDDScannerResult::CoreIPCDDScannerResult):
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
(IPC::decodeRequiringAllowedClasses):
(IPC::ArgumentCoder<T::encode):
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):
(IPC::encodeObjectWithWrapper): Deleted.
(IPC::decodeObjectFromWrapper): Deleted.
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):

Canonical link: https://commits.webkit.org/274933@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