[webkit-reviews] review granted: [Bug 206905] PAL: Remove old iOS version macros : [Attachment 389259] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 30 10:32:42 PST 2020


Darin Adler <darin at apple.com> has granted Jonathan Bedard <jbedard at apple.com>'s
request for review:
Bug 206905: PAL: Remove old iOS version macros
https://bugs.webkit.org/show_bug.cgi?id=206905

Attachment 389259: Patch

https://bugs.webkit.org/attachment.cgi?id=389259&action=review




--- Comment #12 from Darin Adler <darin at apple.com> ---
Comment on attachment 389259
  --> https://bugs.webkit.org/attachment.cgi?id=389259
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=389259&action=review

> Source/WTF/wtf/PlatformHave.h:578
> +#if PLATFORM(WATCHOS) || PLATFORM(APPLETV) || (PLATFORM(IOS_FAMILY) &&
!(defined __has_include && __has_include(<CoreFoundation/CFPriv.h>)))

Still not happy with this but maybe we can land it like this and improve later.
I’m concerned we don’t understand this well enough. It seems that this is about
using SPI vs. API and I am it sure it’s right.

> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:55
>  inline NSData *_Nullable securelyArchivedDataWithRootObject(id _Nonnull
object)

Should probably come back here and remove this from the SPI header. This is
here only to keep the conditionals out of the source dukes and that is no
longer a concern.

> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:64
>  inline NSData *_Nullable insecurelyArchivedDataWithRootObject(id _Nonnull
object)

Ditto.

> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:80
>  inline id _Nullable unarchivedObjectOfClassesFromData(NSSet<Class> *
_Nonnull classes, NSData * _Nonnull data)

Ditto.

> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:89
>  inline RetainPtr<NSKeyedArchiver> secureArchiver()

Ditto.

> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:95
>  inline RetainPtr<NSKeyedUnarchiver> secureUnarchiverFromData(NSData
*_Nonnull data)

Ditto.

> Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h:102
>  inline id _Nullable decodeObjectOfClassForKeyFromCoder(Class _Nonnull cls,
NSString * _Nonnull key, NSCoder * _Nonnull coder)

Ditto.

> Source/WebCore/loader/archive/cf/LegacyWebArchiveMac.mm:68
>      return retainPtr((__bridge CFDataRef)archiver.get().encodedData);

Just something I noticed in passing: no need to call retainPtr here.


More information about the webkit-reviews mailing list