[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

Attachment 341954: Patch


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

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))


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


More information about the webkit-reviews mailing list