Title: [260201] trunk/Source/WebCore
- Revision
- 260201
- Author
- [email protected]
- Date
- 2020-04-16 11:11:26 -0700 (Thu, 16 Apr 2020)
Log Message
[macOS] Update ScreenTime as playback state changes
https://bugs.webkit.org/show_bug.cgi?id=210518
<rdar://problem/61181092>
Reviewed by Eric Carlson.
Follow up to r260182; Pass a WeakPtr into our task queue in sessionWillEndPlayback rather than a bare pointer.
* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (260200 => 260201)
--- trunk/Source/WebCore/ChangeLog 2020-04-16 18:06:46 UTC (rev 260200)
+++ trunk/Source/WebCore/ChangeLog 2020-04-16 18:11:26 UTC (rev 260201)
@@ -1,3 +1,16 @@
+2020-04-16 Jer Noble <[email protected]>
+
+ [macOS] Update ScreenTime as playback state changes
+ https://bugs.webkit.org/show_bug.cgi?id=210518
+ <rdar://problem/61181092>
+
+ Reviewed by Eric Carlson.
+
+ Follow up to r260182; Pass a WeakPtr into our task queue in sessionWillEndPlayback rather than a bare pointer.
+
+ * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
+ (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback):
+
2020-04-16 Said Abou-Hallawa <[email protected]>
Captured ThreadedScrollingTree should check its m_scrollingCoordinator before calling its methods
Modified: trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm (260200 => 260201)
--- trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm 2020-04-16 18:06:46 UTC (rev 260200)
+++ trunk/Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm 2020-04-16 18:11:26 UTC (rev 260201)
@@ -194,8 +194,9 @@
{
PlatformMediaSessionManager::sessionWillEndPlayback(session, delayCallingUpdateNowPlaying);
- m_taskQueue.enqueueTask([&session] {
- session.updateMediaUsageIfChanged();
+ m_taskQueue.enqueueTask([weakSession = makeWeakPtr(session)] {
+ if (weakSession)
+ weakSession->updateMediaUsageIfChanged();
});
if (delayCallingUpdateNowPlaying == DelayCallingUpdateNowPlaying::No)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes