Title: [279949] trunk/Source/WebCore
Revision
279949
Author
[email protected]
Date
2021-07-15 09:15:49 -0700 (Thu, 15 Jul 2021)

Log Message

REGRESSION (r279119?): [iOS] ASSERTION FAILED: !m_impl || !m_shouldEnableAssertions || m_impl->wasConstructedOnMainThread() == isMainThread() seen with 3 WebKitLegacy media API tests
https://bugs.webkit.org/show_bug.cgi?id=227930
<rdar://problem/80545962>

Reviewed by Eric Carlson.

Dispatch to the WebThread if necessary.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (279948 => 279949)


--- trunk/Source/WebCore/ChangeLog	2021-07-15 16:09:01 UTC (rev 279948)
+++ trunk/Source/WebCore/ChangeLog	2021-07-15 16:15:49 UTC (rev 279949)
@@ -1,3 +1,16 @@
+2021-07-15  Jer Noble  <[email protected]>
+
+        REGRESSION (r279119?): [iOS] ASSERTION FAILED: !m_impl || !m_shouldEnableAssertions || m_impl->wasConstructedOnMainThread() == isMainThread() seen with 3 WebKitLegacy media API tests
+        https://bugs.webkit.org/show_bug.cgi?id=227930
+        <rdar://problem/80545962>
+
+        Reviewed by Eric Carlson.
+
+        Dispatch to the WebThread if necessary.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
+
 2021-07-15  Adrian Perez de Castro  <[email protected]>
 
         Non-unified build fixes, mid-July 2021 edition

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (279948 => 279949)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2021-07-15 16:09:01 UTC (rev 279948)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2021-07-15 16:15:49 UTC (rev 279949)
@@ -1089,8 +1089,10 @@
     ASSERT(!m_currentTimeObserver);
     auto weakThis = makeWeakPtr(*this);
     m_currentTimeObserver = [m_avPlayer addPeriodicTimeObserverForInterval:PAL::CMTimeMake(1, 10) queue:dispatch_get_main_queue() usingBlock:[weakThis] (CMTime time) {
-        if (weakThis)
-            weakThis->currentMediaTimeDidChange(PAL::toMediaTime(time));
+        ensureOnMainThread([weakThis, time] {
+            if (weakThis)
+                weakThis->currentMediaTimeDidChange(PAL::toMediaTime(time));
+        });
     }];
 
     setDelayCallbacks(false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to