Title: [220504] trunk/Source/WebKit
- Revision
- 220504
- Author
- commit-qu...@webkit.org
- Date
- 2017-08-09 19:11:47 -0700 (Wed, 09 Aug 2017)
Log Message
Invalidate PlaybackSessionManager in same fashion as VideoFullscreenManager.
https://bugs.webkit.org/show_bug.cgi?id=175399
rdar://problem/33663344
Patch by Jeremy Jones <jere...@apple.com> on 2017-08-09
Reviewed by Eric Carlson.
Invalidate PlaybackSessionManager when WebPage is destructed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
* WebProcess/cocoa/PlaybackSessionManager.h:
* WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::~PlaybackSessionManager):
(WebKit::PlaybackSessionManager::invalidate):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (220503 => 220504)
--- trunk/Source/WebKit/ChangeLog 2017-08-10 01:15:14 UTC (rev 220503)
+++ trunk/Source/WebKit/ChangeLog 2017-08-10 02:11:47 UTC (rev 220504)
@@ -1,3 +1,20 @@
+2017-08-09 Jeremy Jones <jere...@apple.com>
+
+ Invalidate PlaybackSessionManager in same fashion as VideoFullscreenManager.
+ https://bugs.webkit.org/show_bug.cgi?id=175399
+ rdar://problem/33663344
+
+ Reviewed by Eric Carlson.
+
+ Invalidate PlaybackSessionManager when WebPage is destructed.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::~WebPage):
+ * WebProcess/cocoa/PlaybackSessionManager.h:
+ * WebProcess/cocoa/PlaybackSessionManager.mm:
+ (WebKit::PlaybackSessionManager::~PlaybackSessionManager):
+ (WebKit::PlaybackSessionManager::invalidate):
+
2017-08-09 Don Olmstead <don.olmst...@sony.com>
[WTF] Move TextStream into WTF
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (220503 => 220504)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2017-08-10 01:15:14 UTC (rev 220503)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2017-08-10 02:11:47 UTC (rev 220504)
@@ -673,6 +673,9 @@
#endif
#if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+ if (m_playbackSessionManager)
+ m_playbackSessionManager->invalidate();
+
if (m_videoFullscreenManager)
m_videoFullscreenManager->invalidate();
#endif
Modified: trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h (220503 => 220504)
--- trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h 2017-08-10 01:15:14 UTC (rev 220503)
+++ trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h 2017-08-10 02:11:47 UTC (rev 220504)
@@ -99,6 +99,8 @@
public:
static Ref<PlaybackSessionManager> create(WebPage&);
virtual ~PlaybackSessionManager();
+
+ void invalidate();
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
Modified: trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm (220503 => 220504)
--- trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm 2017-08-10 01:15:14 UTC (rev 220503)
+++ trunk/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm 2017-08-10 02:11:47 UTC (rev 220504)
@@ -184,7 +184,15 @@
m_mediaElements.clear();
m_clientCounts.clear();
+ if (m_page)
+ WebProcess::singleton().removeMessageReceiver(Messages::PlaybackSessionManager::messageReceiverName(), m_page->pageID());
+}
+
+void PlaybackSessionManager::invalidate()
+{
+ ASSERT(m_page);
WebProcess::singleton().removeMessageReceiver(Messages::PlaybackSessionManager::messageReceiverName(), m_page->pageID());
+ m_page = nullptr;
}
PlaybackSessionManager::ModelInterfaceTuple PlaybackSessionManager::createModelAndInterface(uint64_t contextId)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes