Title: [156343] branches/safari-537.60-branch/Source/WebCore
- Revision
- 156343
- Author
- [email protected]
- Date
- 2013-09-24 11:38:49 -0700 (Tue, 24 Sep 2013)
Log Message
Merged r156315. <rdar://problem/15063134>
Modified Paths
Diff
Modified: branches/safari-537.60-branch/Source/WebCore/ChangeLog (156342 => 156343)
--- branches/safari-537.60-branch/Source/WebCore/ChangeLog 2013-09-24 18:20:48 UTC (rev 156342)
+++ branches/safari-537.60-branch/Source/WebCore/ChangeLog 2013-09-24 18:38:49 UTC (rev 156343)
@@ -1,3 +1,21 @@
+2013-09-24 Lucas Forschler <[email protected]>
+
+ Merge r156315
+
+ 2013-09-23 Brent Fulgham <[email protected]>
+
+ [Windows] Moving back in history from a page with <video>, then moving forward causes crash.
+ https://bugs.webkit.org/show_bug.cgi?id=120475
+
+ Reviewed by Anders Carlsson.
+
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
+ (WebCore::AVFWrapper::AVFWrapper): Add assertion that creation is on main thread.
+ (WebCore::AVFWrapper::~AVFWrapper): Add assertion that destruction is on main thread.
+ (WebCore::destroyAVFWrapper): Helper function to dispatch on main queue.
+ (WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper): Spawn AVFoundationCF destruction to
+ main queue.
+
2013-09-24 Roger Fong <[email protected]>
Unreviewed. Build fix for Windows following r156221.
Modified: branches/safari-537.60-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (156342 => 156343)
--- branches/safari-537.60-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-09-24 18:20:48 UTC (rev 156342)
+++ branches/safari-537.60-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-09-24 18:38:49 UTC (rev 156343)
@@ -1143,6 +1143,7 @@
, m_objectID(s_nextAVFWrapperObjectID++)
, m_currentTrack(0)
{
+ ASSERT(isMainThread());
LOG(Media, "AVFWrapper::AVFWrapper(%p)", this);
m_notificationQueue = dispatch_queue_create("MediaPlayerPrivateAVFoundationCF.notificationQueue", 0);
@@ -1151,6 +1152,7 @@
AVFWrapper::~AVFWrapper()
{
+ ASSERT(isMainThread());
LOG(Media, "AVFWrapper::~AVFWrapper(%p %d)", this, m_objectID);
destroyVideoLayer();
@@ -1229,6 +1231,15 @@
dispatch_async_f(dispatchQueue(), this, disconnectAndDeleteAVFWrapper);
}
+static void destroyAVFWrapper(void* context)
+{
+ AVFWrapper* avfWrapper = static_cast<AVFWrapper*>(context);
+ if (!avfWrapper)
+ return;
+
+ delete avfWrapper;
+}
+
void AVFWrapper::disconnectAndDeleteAVFWrapper(void* context)
{
AVFWrapper* avfWrapper = static_cast<AVFWrapper*>(context);
@@ -1261,7 +1272,8 @@
AVCFPlayerItemRemoveOutput(avfWrapper->avPlayerItem(), avfWrapper->legibleOutput());
#endif
- delete avfWrapper;
+ // We must release the AVCFPlayer and other items on the same thread that created them.
+ dispatch_async_f(dispatch_get_main_queue(), context, destroyAVFWrapper);
}
void AVFWrapper::createAssetForURL(const String& url)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes