Title: [265468] branches/safari-610.1.25.10-branch/Source/WebCore
Revision
265468
Author
[email protected]
Date
2020-08-10 16:47:50 -0700 (Mon, 10 Aug 2020)

Log Message

Cherry-pick r265257. rdar://problem/66644029

    REGRESSION (r265019): ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::PlaybackSessionInterfaceAVKit::invalidate()
    https://bugs.webkit.org/show_bug.cgi?id=215118

    Reviewed by Jer Noble.

    Revert the change about using a WeakPtr of PlaybackSessionModel in r265019.
    On WK1, a VideoFullscreenControllerContext (a subclass of PlaybackSessionModel)
    object is created on the main thread, so we cannot use a WeakPtr of it on
    the UI thread.

    No new tests, fix an API test failure: WebKitLegacy.AudioSessionCategoryIOS.

    * platform/ios/PlaybackSessionInterfaceAVKit.h:
    * platform/ios/PlaybackSessionInterfaceAVKit.mm:
    (WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
    (WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610.1.25.10-branch/Source/WebCore/ChangeLog (265467 => 265468)


--- branches/safari-610.1.25.10-branch/Source/WebCore/ChangeLog	2020-08-10 23:47:47 UTC (rev 265467)
+++ branches/safari-610.1.25.10-branch/Source/WebCore/ChangeLog	2020-08-10 23:47:50 UTC (rev 265468)
@@ -1,5 +1,48 @@
 2020-08-10  Alan Coon  <[email protected]>
 
+        Cherry-pick r265257. rdar://problem/66644029
+
+    REGRESSION (r265019): ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::PlaybackSessionInterfaceAVKit::invalidate()
+    https://bugs.webkit.org/show_bug.cgi?id=215118
+    
+    Reviewed by Jer Noble.
+    
+    Revert the change about using a WeakPtr of PlaybackSessionModel in r265019.
+    On WK1, a VideoFullscreenControllerContext (a subclass of PlaybackSessionModel)
+    object is created on the main thread, so we cannot use a WeakPtr of it on
+    the UI thread.
+    
+    No new tests, fix an API test failure: WebKitLegacy.AudioSessionCategoryIOS.
+    
+    * platform/ios/PlaybackSessionInterfaceAVKit.h:
+    * platform/ios/PlaybackSessionInterfaceAVKit.mm:
+    (WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
+    (WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-04  Peng Liu  <[email protected]>
+
+            REGRESSION (r265019): ASSERTION FAILED: !m_impl || m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::PlaybackSessionInterfaceAVKit::invalidate()
+            https://bugs.webkit.org/show_bug.cgi?id=215118
+
+            Reviewed by Jer Noble.
+
+            Revert the change about using a WeakPtr of PlaybackSessionModel in r265019.
+            On WK1, a VideoFullscreenControllerContext (a subclass of PlaybackSessionModel)
+            object is created on the main thread, so we cannot use a WeakPtr of it on
+            the UI thread.
+
+            No new tests, fix an API test failure: WebKitLegacy.AudioSessionCategoryIOS.
+
+            * platform/ios/PlaybackSessionInterfaceAVKit.h:
+            * platform/ios/PlaybackSessionInterfaceAVKit.mm:
+            (WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit):
+            (WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const):
+
+2020-08-10  Alan Coon  <[email protected]>
+
         Cherry-pick r265198. rdar://problem/66644002
 
     REGRESSION(r259585) Text decoration color with value currentColor miscomputed in some cases

Modified: branches/safari-610.1.25.10-branch/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h (265467 => 265468)


--- branches/safari-610.1.25.10-branch/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h	2020-08-10 23:47:47 UTC (rev 265467)
+++ branches/safari-610.1.25.10-branch/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h	2020-08-10 23:47:50 UTC (rev 265468)
@@ -81,7 +81,7 @@
 private:
     PlaybackSessionInterfaceAVKit(PlaybackSessionModel&);
     RetainPtr<WebAVPlayerController> m_playerController;
-    WeakPtr<PlaybackSessionModel> m_playbackSessionModel;
+    PlaybackSessionModel* m_playbackSessionModel { nullptr };
 };
 
 }

Modified: branches/safari-610.1.25.10-branch/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm (265467 => 265468)


--- branches/safari-610.1.25.10-branch/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm	2020-08-10 23:47:47 UTC (rev 265467)
+++ branches/safari-610.1.25.10-branch/Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm	2020-08-10 23:47:50 UTC (rev 265468)
@@ -51,7 +51,7 @@
 
 PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit(PlaybackSessionModel& model)
     : m_playerController(adoptNS([[WebAVPlayerController alloc] init]))
-    , m_playbackSessionModel(makeWeakPtr(model))
+    , m_playbackSessionModel(&model)
 {
     ASSERT(isUIThread());
     model.addClient(*this);
@@ -81,7 +81,7 @@
 
 PlaybackSessionModel* PlaybackSessionInterfaceAVKit::playbackSessionModel() const
 {
-    return m_playbackSessionModel.get();
+    return m_playbackSessionModel;
 }
 
 void PlaybackSessionInterfaceAVKit::durationChanged(double duration)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to