Title: [158073] branches/safari-537.73-branch/Source/WebCore
- Revision
- 158073
- Author
- [email protected]
- Date
- 2013-10-25 17:02:39 -0700 (Fri, 25 Oct 2013)
Log Message
Merged r156315. <rdar://problem/15109335>
Modified Paths
Diff
Modified: branches/safari-537.73-branch/Source/WebCore/ChangeLog (158072 => 158073)
--- branches/safari-537.73-branch/Source/WebCore/ChangeLog 2013-10-25 23:53:41 UTC (rev 158072)
+++ branches/safari-537.73-branch/Source/WebCore/ChangeLog 2013-10-26 00:02:39 UTC (rev 158073)
@@ -1,5 +1,23 @@
2013-10-25 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-10-25 Lucas Forschler <[email protected]>
+
Merge r155665
2013-09-12 Tim Horton <[email protected]>
Modified: branches/safari-537.73-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (158072 => 158073)
--- branches/safari-537.73-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-10-25 23:53:41 UTC (rev 158072)
+++ branches/safari-537.73-branch/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-10-26 00:02:39 UTC (rev 158073)
@@ -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