Changeset 173218 in webkit


Ignore:
Timestamp:
Sep 3, 2014 12:57:34 PM (10 years ago)
Author:
Brent Fulgham
Message:

[Win] Improper release of unretained AVCFAssetResourceLoaderRef
https://bugs.webkit.org/show_bug.cgi?id=136493
<rdar://problem/18112559>

Reviewed by Eric Carlson.

Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
RetainPtr. We don't hold onto this value or want to control its lifetime; we just
want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.

Use of the RetainPtr created a double-release and crash.

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

(WebCore::AVFWrapper::createAssetForURL):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r173217 r173218  
     12014-09-03  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] Improper release of unretained AVCFAssetResourceLoaderRef
     4        https://bugs.webkit.org/show_bug.cgi?id=136493
     5        <rdar://problem/18112559>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
     10        RetainPtr. We don't hold onto this value or want to control its lifetime; we just
     11        want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.
     12
     13        Use of the RetainPtr created a double-release and crash.
     14
     15        * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
     16        (WebCore::AVFWrapper::createAssetForURL):
     17
    1182014-09-03  David Hyatt  <hyatt@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp

    r173216 r173218  
    14361436    loaderCallbacks.resourceLoaderShouldWaitForLoadingOfRequestedResource = AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource;
    14371437
    1438     RetainPtr<AVCFAssetResourceLoaderRef> resourceLoader = adoptCF(AVCFURLAssetGetResourceLoader(m_avAsset.get()));
    1439     AVCFAssetResourceLoaderSetCallbacks(resourceLoader.get(), &loaderCallbacks, globalLoaderDelegateQueue());
     1438    AVCFAssetResourceLoaderRef resourceLoader = AVCFURLAssetGetResourceLoader(m_avAsset.get());
     1439    AVCFAssetResourceLoaderSetCallbacks(resourceLoader, &loaderCallbacks, globalLoaderDelegateQueue());
    14401440#endif
    14411441}
Note: See TracChangeset for help on using the changeset viewer.