[webkit-reviews] review granted: [Bug 186300] [Cocoa] Improve smart pointer support for ARC (OSObjectPtr/DispatchPtr) : [Attachment 341954] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 4 22:52:59 PDT 2018


Daniel Bates <dbates at webkit.org> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 186300: [Cocoa] Improve smart pointer support for ARC
(OSObjectPtr/DispatchPtr)
https://bugs.webkit.org/show_bug.cgi?id=186300

Attachment 341954: Patch

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




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

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

> Source/WTF/wtf/DispatchPtr.h:48
> +#if !(defined(__OBJC__) && __has_feature(objc_arc))

This is OK as-is. Negation tends to be harder to reason about. I find that
pushing the negation through an expression tends to make it easier to reason
about: !defined(__OBJ__) || !__has_feature(objc_arc)

> Source/WTF/wtf/DispatchPtr.h:56
> +#if !(defined(__OBJC__) && __has_feature(objc_arc))

Ditto.

> Source/WTF/wtf/DispatchPtr.h:64
> +#if !(defined(__OBJC__) && __has_feature(objc_arc))

Ditto.


More information about the webkit-reviews mailing list