Bug 153985

Summary: Remove __weak from WKAirPlayRoutePicker.mm to fix build warning.
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: New BugsAssignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+
Patch for landing. none

Description Jeremy Jones 2016-02-08 07:39:18 PST
Remove __weak from WKAirPlayRoutePicker.mm to fix build warning.
Comment 1 Jeremy Jones 2016-02-08 07:40:30 PST
rdar://problem/24485348
Comment 2 Jeremy Jones 2016-02-08 07:42:55 PST
Created attachment 270854 [details]
Patch
Comment 3 Darin Adler 2016-02-08 08:54:19 PST
Comment on attachment 270854 [details]
Patch

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

> Source/WebKit2/UIProcess/ios/forms/WKAirPlayRoutePicker.mm:53
> -    __weak WKContentView* _view;   // Weak reference.
> +    __unsafe_unretained WKContentView* _view; // Weak reference.

Since this code is not ARC, we should not have any modifier at all. Is there any value to stating __unsafe_unretained here?
Comment 4 Darin Adler 2016-02-08 08:54:43 PST
Comment on attachment 270854 [details]
Patch

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

>> Source/WebKit2/UIProcess/ios/forms/WKAirPlayRoutePicker.mm:53
>> +    __unsafe_unretained WKContentView* _view; // Weak reference.
> 
> Since this code is not ARC, we should not have any modifier at all. Is there any value to stating __unsafe_unretained here?

I suggest removing __weak and not replacing it with anything.
Comment 5 Jeremy Jones 2016-02-08 10:25:21 PST
(In reply to comment #4)
> Comment on attachment 270854 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270854&action=review
> 
> >> Source/WebKit2/UIProcess/ios/forms/WKAirPlayRoutePicker.mm:53
> >> +    __unsafe_unretained WKContentView* _view; // Weak reference.
> > 
> > Since this code is not ARC, we should not have any modifier at all. Is there any value to stating __unsafe_unretained here?
> 
> I suggest removing __weak and not replacing it with anything.

If this were a header that might get included in an ARC code, it would be necessary. Since it is in an .mm file, the only value is in annotating the fact that this is an unretained reference.  I'll remove it.
Comment 6 Jeremy Jones 2016-02-08 10:28:41 PST
Created attachment 270863 [details]
Patch for landing.
Comment 7 WebKit Commit Bot 2016-02-08 11:27:03 PST
Comment on attachment 270863 [details]
Patch for landing.

Clearing flags on attachment: 270863

Committed r196260: <http://trac.webkit.org/changeset/196260>