Bug 186300

Summary: [Cocoa] Improve smart pointer support for ARC (OSObjectPtr/DispatchPtr)
Product: WebKit Reporter: Darin Adler <darin>
Component: Web Template FrameworkAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, dbates, ews-watchlist, mitz, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
dbates: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews205 for win-future none

Description Darin Adler 2018-06-04 22:39:44 PDT
[Cocoa] Improve smart pointer support for ARC (OSObjectPtr/DispatchPtr)
Comment 1 Darin Adler 2018-06-04 22:41:29 PDT
Created attachment 341954 [details]
Patch
Comment 2 Daniel Bates 2018-06-04 22:52:59 PDT
Comment on attachment 341954 [details]
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.
Comment 3 EWS Watchlist 2018-06-05 02:12:13 PDT
Comment on attachment 341954 [details]
Patch

Attachment 341954 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7999285

New failing tests:
http/tests/security/video-poster-cross-origin-crash2.html
Comment 4 EWS Watchlist 2018-06-05 02:12:25 PDT
Created attachment 341959 [details]
Archive of layout-test-results from ews205 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews205  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 5 Darin Adler 2018-06-05 09:12:52 PDT
Committed r232509: <https://trac.webkit.org/changeset/232509>
Comment 6 Radar WebKit Bug Importer 2018-06-05 09:14:09 PDT
<rdar://problem/40810079>