Title: [176476] trunk/Source/WebCore
- Revision
- 176476
- Author
- jer.no...@apple.com
- Date
- 2014-11-21 15:29:08 -0800 (Fri, 21 Nov 2014)
Log Message
[Mac] Random crashes inside media libraries when creating then destroying media quickly.
https://bugs.webkit.org/show_bug.cgi?id=138980
Reviewed by Eric Carlson.
Speculative fix for random crashes in the layout tests which occur randomly but regularly. The theory is
that creating-then-destroying our media objects too quickly triggers crashes deep within the media frameworks
when their initialization threads don't have a chance to complete before the main player object is destroyed.
Test out this theory by delaying the destruction of the AVPlayer object for 1s after its owner is destroyed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (176475 => 176476)
--- trunk/Source/WebCore/ChangeLog 2014-11-21 23:24:20 UTC (rev 176475)
+++ trunk/Source/WebCore/ChangeLog 2014-11-21 23:29:08 UTC (rev 176476)
@@ -1,5 +1,20 @@
2014-11-21 Jer Noble <jer.no...@apple.com>
+ [Mac] Random crashes inside media libraries when creating then destroying media quickly.
+ https://bugs.webkit.org/show_bug.cgi?id=138980
+
+ Reviewed by Eric Carlson.
+
+ Speculative fix for random crashes in the layout tests which occur randomly but regularly. The theory is
+ that creating-then-destroying our media objects too quickly triggers crashes deep within the media frameworks
+ when their initialization threads don't have a chance to complete before the main player object is destroyed.
+ Test out this theory by delaying the destruction of the AVPlayer object for 1s after its owner is destroyed.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
+
+2014-11-21 Jer Noble <jer.no...@apple.com>
+
[Mac] Delay of 1-2s after the first paint of a video frame.
https://bugs.webkit.org/show_bug.cgi?id=138979
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (176475 => 176476)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-11-21 23:24:20 UTC (rev 176475)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-11-21 23:29:08 UTC (rev 176476)
@@ -496,7 +496,11 @@
#if ENABLE(IOS_AIRPLAY)
[m_avPlayer.get() removeObserver:m_objcObserver.get() forKeyPath:@"externalPlaybackActive"];
#endif
- m_avPlayer = nil;
+
+ RetainPtr<AVPlayerType> strongPlayer = WTF::move(m_avPlayer);
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), [strongPlayer] () mutable {
+ strongPlayer.clear();
+ });
}
// Reset cached properties
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes