Bug 136493

Summary: [Win] Improper release of unretained AVCFAssetResourceLoaderRef
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: MediaAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Blocker CC: bfulgham, commit-queue, eric.carlson, glenn, jer.noble, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch eric.carlson: review+

Description Brent Fulgham 2014-09-03 12:42:22 PDT
The return value of AVCFURLAssetGetResourceLoader is being adopted by a RetainPtr. This is wrong for a couple of reasons:

1. We use the return value as an argument to another API call, and are not seeking to hold ownership. So the RetainPtr is not necessary and just adds overhead.
2. Since we adopt the argument, we don't increment the reference count. Per Get/Copy/Create semantics, the return value of AVCFURLAssetGetResourceLoader does not have its retain count incremented, so it is inappropriate to release this value.
Comment 1 Brent Fulgham 2014-09-03 12:42:52 PDT
<rdar://problem/18112559>
Comment 2 Brent Fulgham 2014-09-03 12:46:50 PDT
Created attachment 237571 [details]
Patch
Comment 3 Brent Fulgham 2014-09-03 12:59:05 PDT
Committed in r173218. <http://trac.webkit.org/changeset/173218>