Title: [173218] trunk/Source/WebCore
Revision
173218
Author
bfulg...@apple.com
Date
2014-09-03 12:57:34 -0700 (Wed, 03 Sep 2014)

Log 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): 

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173217 => 173218)


--- trunk/Source/WebCore/ChangeLog	2014-09-03 19:26:38 UTC (rev 173217)
+++ trunk/Source/WebCore/ChangeLog	2014-09-03 19:57:34 UTC (rev 173218)
@@ -1,3 +1,20 @@
+2014-09-03  Brent Fulgham  <bfulg...@apple.com>
+
+        [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): 
+
 2014-09-03  David Hyatt  <hy...@apple.com>
 
         Add support for the initial-letter CSS property to first-letter

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (173217 => 173218)


--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2014-09-03 19:26:38 UTC (rev 173217)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp	2014-09-03 19:57:34 UTC (rev 173218)
@@ -1435,8 +1435,8 @@
     loaderCallbacks.context = callbackContext();
     loaderCallbacks.resourceLoaderShouldWaitForLoadingOfRequestedResource = AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource;
 
-    RetainPtr<AVCFAssetResourceLoaderRef> resourceLoader = adoptCF(AVCFURLAssetGetResourceLoader(m_avAsset.get()));
-    AVCFAssetResourceLoaderSetCallbacks(resourceLoader.get(), &loaderCallbacks, globalLoaderDelegateQueue());
+    AVCFAssetResourceLoaderRef resourceLoader = AVCFURLAssetGetResourceLoader(m_avAsset.get());
+    AVCFAssetResourceLoaderSetCallbacks(resourceLoader, &loaderCallbacks, globalLoaderDelegateQueue());
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to