Bug 137158 - Replace OSObjectPtr with RetainPtr/adoptOS
Summary: Replace OSObjectPtr with RetainPtr/adoptOS
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
Depends on: 137231
  Show dependency treegraph
Reported: 2014-09-26 14:47 PDT by Sam Weinig
Modified: 2014-10-03 17:39 PDT (History)
4 users (show)

See Also:

Patch (39.11 KB, patch)
2014-09-26 14:52 PDT, Sam Weinig
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 2 mitz 2014-09-26 16:24:07 PDT
Comment on attachment 238740 [details]

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

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.