Bug 136493 - [Win] Improper release of unretained AVCFAssetResourceLoaderRef
Summary: [Win] Improper release of unretained AVCFAssetResourceLoaderRef
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Blocker
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Reported: 2014-09-03 12:42 PDT by Brent Fulgham
Modified: 2014-09-19 17:07 PDT (History)
8 users (show)

See Also:

Patch (2.07 KB, patch)
2014-09-03 12:46 PDT, Brent Fulgham
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 2 Brent Fulgham 2014-09-03 12:46:50 PDT
Created attachment 237571 [details]
Comment 3 Brent Fulgham 2014-09-03 12:59:05 PDT
Committed in r173218. <http://trac.webkit.org/changeset/173218>