Bug 137158

Summary: Replace OSObjectPtr with RetainPtr/adoptOS
Product: WebKit Reporter: Sam Weinig <sam>
Component: New BugsAssignee: Sam Weinig <sam>
Status: RESOLVED WONTFIX    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 137231    
Bug Blocks:    
Attachments:
Description Flags
Patch mitz: review+

Description Sam Weinig 2014-09-26 14:47:29 PDT
Replace OSObjectPtr with RetainPtr/adoptOS
Comment 1 Sam Weinig 2014-09-26 14:52:24 PDT
Created attachment 238740 [details]
Patch
Comment 2 mitz 2014-09-26 16:24:07 PDT
Comment on attachment 238740 [details]
Patch

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

> Source/WTF/ChangeLog:15
> +        in that unlike adoptCF(), it can be passed an objective-c type (since OS objects
> +        are sometimes objective-c objects, but not always), and unlike adoptNS() it doesn't 
> +        require us to jump through hoops to appease GC (since OS objects are not objective-c

Objective-C
Comment 3 Sam Weinig 2014-09-28 14:00:20 PDT
Fixed in https://trac.webkit.org/r174045 .
Comment 4 Ryosuke Niwa 2014-09-29 09:46:56 PDT
Looks like this patch introduced a PLT3 crasher in Yosemite :(  See <rdar://problem/18487776>.
Comment 5 WebKit Commit Bot 2014-09-29 14:23:10 PDT
Re-opened since this is blocked by bug 137231
Comment 6 Sam Weinig 2014-10-03 17:39:32 PDT
(In reply to comment #5)
> Re-opened since this is blocked by bug 137231

Scrapping this for now.  In 32-bit, OS Objects are not objective-c objects, but also not CFObjects, so they can't be CFRetain()/CFReleased().  I think we are going to need to stick with OSObjectPtr for now.