Bug 121230

Summary: SharedBuffer::createCFData should return RetainPtr<CFDataRef>
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, japhet
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Description Anders Carlsson 2013-09-12 09:38:22 PDT
SharedBuffer::createCFData should return RetainPtr<CFDataRef>
Comment 1 Anders Carlsson 2013-09-12 09:39:25 PDT
Created attachment 211436 [details]
Patch
Comment 2 Darin Adler 2013-09-12 09:40:47 PDT
Comment on attachment 211436 [details]
Patch

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

> Source/WebCore/platform/mac/SharedBufferMac.mm:109
> +    return adoptCF((CFDataRef)adoptNS([[WebCoreSharedBufferData alloc] initWithSharedBuffer:this]).leakRef());

We’ve got to find a better idiom for toll free bridging with RetainPtr than this. It destroys the rule of “look for leakRef” to find bugs.
Comment 3 Anders Carlsson 2013-09-12 10:37:31 PDT
Committed r155629: <http://trac.webkit.org/changeset/155629>