Title: [258838] trunk/Source/WebKit
Revision
258838
Author
[email protected]
Date
2020-03-23 07:26:33 -0700 (Mon, 23 Mar 2020)

Log Message

RemoteAudioSession should listen to GPUProcess messages
https://bugs.webkit.org/show_bug.cgi?id=209422

Reviewed by Eric Carlson.

Make sure RemoteAudioSession is registered as a listener to GPUProcess messages.

* WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (258837 => 258838)


--- trunk/Source/WebKit/ChangeLog	2020-03-23 14:24:19 UTC (rev 258837)
+++ trunk/Source/WebKit/ChangeLog	2020-03-23 14:26:33 UTC (rev 258838)
@@ -1,3 +1,16 @@
+2020-03-23  Youenn Fablet  <[email protected]>
+
+        RemoteAudioSession should listen to GPUProcess messages
+        https://bugs.webkit.org/show_bug.cgi?id=209422
+
+        Reviewed by Eric Carlson.
+
+        Make sure RemoteAudioSession is registered as a listener to GPUProcess messages.
+
+        * WebProcess/GPU/media/RemoteAudioSession.cpp:
+        (WebKit::RemoteAudioSession::RemoteAudioSession):
+        (WebKit::RemoteAudioSession::~RemoteAudioSession):
+
 2020-03-23  Pablo Saavedra  <[email protected]>
 
         [GTK][WPE] Check the cgroups memory limits (v1 and v2) to calculate the systemMemoryUsedAsPercentage() in the MemoryPressureMonitor

Modified: trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp (258837 => 258838)


--- trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp	2020-03-23 14:24:19 UTC (rev 258837)
+++ trunk/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp	2020-03-23 14:26:33 UTC (rev 258838)
@@ -30,6 +30,7 @@
 
 #include "GPUConnectionToWebProcessMessages.h"
 #include "GPUProcessProxy.h"
+#include "RemoteAudioSessionMessages.h"
 #include "RemoteAudioSessionProxyMessages.h"
 #include <WebCore/PlatformMediaSessionManager.h>
 
@@ -48,9 +49,14 @@
     : m_process(process)
     , m_configuration(WTFMove(configuration))
 {
+    m_process.ensureGPUProcessConnection().messageReceiverMap().addMessageReceiver(Messages::RemoteAudioSession::messageReceiverName(), 0, *this);
 }
 
-RemoteAudioSession::~RemoteAudioSession() = default;
+RemoteAudioSession::~RemoteAudioSession()
+{
+    if (auto* connection = m_process.existingGPUProcessConnection())
+        connection->messageReceiverMap().removeMessageReceiver(Messages::RemoteAudioSession::messageReceiverName(), 0);
+}
 
 IPC::Connection& RemoteAudioSession::connection()
 {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to