[webkit-reviews] review granted: [Bug 186245] [Cocoa] Update more code to be more ARC-compatible to prepare for future ARC adoption : [Attachment 341888] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 3 23:48:05 PDT 2018


Daniel Bates <dbates at webkit.org> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 186245: [Cocoa] Update more code to be more ARC-compatible to prepare for
future ARC adoption
https://bugs.webkit.org/show_bug.cgi?id=186245

Attachment 341888: Patch

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




--- Comment #12 from Daniel Bates <dbates at webkit.org> ---
Comment on attachment 341888
  --> https://bugs.webkit.org/attachment.cgi?id=341888
Patch

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

>
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourc
eAVFObjC.mm:562
> +	   NSDictionary *attributes = @{ (__bridge NSString
*)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA) };

This is ok as-is. Could use auto here.

> Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:222
> +	   NSDictionary* videoDecoderSpecification = @{ (__bridge NSString
*)kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder: @YES };

Ditto.

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:819
> +    CFURLRef result = CFURLCreateWithBytes(NULL, urlBytes.data(),
fragRg.location - 1, kCFStringEncodingUTF8, NULL);

This is ok as-is. NULL => nullptr 

(There are two in this line).

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:821
> +	   result = CFURLCreateWithBytes(NULL, urlBytes.data(), fragRg.location
- 1, kCFStringEncodingISOLatin1, NULL);

Ditto.

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:1012
> +    CFURLRef result = CFURLCreateWithBytes(NULL, urlBytes, numBytes -
range.length, kCFStringEncodingUTF8, NULL);

Ditto.

> Source/WebCore/platform/mac/WebCoreNSURLExtras.mm:1014
> +	   result = CFURLCreateWithBytes(NULL, urlBytes, numBytes -
range.length, kCFStringEncodingISOLatin1, NULL);

Ditto.

> Source/WebCore/platform/network/mac/ResourceErrorMac.mm:121
> +    : ResourceError((__bridge NSError *)cfError)

This is ok as-is. Could use uniform initializer syntax.


More information about the webkit-reviews mailing list