Title: [277020] trunk
Revision
277020
Author
j...@apple.com
Date
2021-05-05 08:07:05 -0700 (Wed, 05 May 2021)

Log Message

imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html is a flakey
https://bugs.webkit.org/show_bug.cgi?id=225386
rdar://74704447

Reviewed by Eric Carlson.

Source/WebKit:

When enabling/disabling a track, the web content process would send a message to the GPU process which in turn
would send a message back to the content process, notifying that the track configuration had changed, that would
then enable/disable again the track.
If the content process in between those IPC messages had modified the track (such as via JS call), it was
possible for the track status to get lost once the GPU message above got actioned.

Having the GPU process notify that a track configuration got changed when it was originally triggered by the
content process is unnecessary. We modify the RemoteAudioTrack and RemoteVideoTrack so that if the change came
from the web process, the GPU process doesn't send a message back with information that could already be obsolete.

No new tests. Fix an assertion failure in tests.

* GPUProcess/media/RemoteAudioTrackProxy.cpp:
(WebKit::RemoteAudioTrackProxy::enabledChanged):
* GPUProcess/media/RemoteAudioTrackProxy.h:
* GPUProcess/media/RemoteVideoTrackProxy.cpp:
(WebKit::RemoteVideoTrackProxy::selectedChanged):
* GPUProcess/media/RemoteVideoTrackProxy.h:

LayoutTests:

* platform/mac-wk2/TestExpectations: Remove

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (277019 => 277020)


--- trunk/LayoutTests/ChangeLog	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/LayoutTests/ChangeLog	2021-05-05 15:07:05 UTC (rev 277020)
@@ -1,3 +1,13 @@
+2021-05-05  Jean-Yves Avenard  <j...@apple.com>
+
+        imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html is a flakey
+        https://bugs.webkit.org/show_bug.cgi?id=225386
+        rdar://74704447
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac-wk2/TestExpectations: Remove
+
 2021-05-04  Tyler Wilcock  <twilc...@protonmail.com>
 
         Import webstorage WPTs

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (277019 => 277020)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-05-05 15:07:05 UTC (rev 277020)
@@ -1285,8 +1285,6 @@
 
 webkit.org/b/222365 inspector/dom/attributeModified.html [ Pass Timeout ]
 
-webkit.org/b/222371 imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html [ Pass Failure Crash ]
-
 # webkit.org/b/222277
 imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-no-sink.https.html [ Skip ]
 imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-peerconnection.https.html [ Skip ]

Modified: trunk/Source/WebKit/ChangeLog (277019 => 277020)


--- trunk/Source/WebKit/ChangeLog	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/Source/WebKit/ChangeLog	2021-05-05 15:07:05 UTC (rev 277020)
@@ -1,3 +1,30 @@
+2021-05-05  Jean-Yves Avenard  <j...@apple.com>
+
+        imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html is a flakey
+        https://bugs.webkit.org/show_bug.cgi?id=225386
+        rdar://74704447
+
+        Reviewed by Eric Carlson.
+
+        When enabling/disabling a track, the web content process would send a message to the GPU process which in turn
+        would send a message back to the content process, notifying that the track configuration had changed, that would
+        then enable/disable again the track.
+        If the content process in between those IPC messages had modified the track (such as via JS call), it was
+        possible for the track status to get lost once the GPU message above got actioned.
+
+        Having the GPU process notify that a track configuration got changed when it was originally triggered by the
+        content process is unnecessary. We modify the RemoteAudioTrack and RemoteVideoTrack so that if the change came
+        from the web process, the GPU process doesn't send a message back with information that could already be obsolete.
+
+        No new tests. Fix an assertion failure in tests.
+
+        * GPUProcess/media/RemoteAudioTrackProxy.cpp:
+        (WebKit::RemoteAudioTrackProxy::enabledChanged):
+        * GPUProcess/media/RemoteAudioTrackProxy.h:
+        * GPUProcess/media/RemoteVideoTrackProxy.cpp:
+        (WebKit::RemoteVideoTrackProxy::selectedChanged):
+        * GPUProcess/media/RemoteVideoTrackProxy.h:
+
 2021-05-05  Youenn Fablet  <you...@apple.com>
 
         Dynamically pass capture sandbox extensions to GPUProcess

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp (277019 => 277020)


--- trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.cpp	2021-05-05 15:07:05 UTC (rev 277020)
@@ -81,8 +81,11 @@
     ASSERT_NOT_REACHED();
 }
 
-void RemoteAudioTrackProxy::enabledChanged(bool)
+void RemoteAudioTrackProxy::enabledChanged(bool enabled)
 {
+    if (enabled == m_enabled)
+        return;
+    m_enabled = enabled;
     configurationChanged();
 }
 

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h (277019 => 277020)


--- trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteAudioTrackProxy.h	2021-05-05 15:07:05 UTC (rev 277020)
@@ -58,7 +58,11 @@
     virtual ~RemoteAudioTrackProxy();
 
     TrackPrivateRemoteIdentifier identifier() const { return m_identifier; };
-    void setEnabled(bool enabled) { m_trackPrivate->setEnabled(enabled); }
+    void setEnabled(bool enabled)
+    {
+        m_enabled = enabled;
+        m_trackPrivate->setEnabled(enabled);
+    }
 
 private:
     RemoteAudioTrackProxy(GPUConnectionToWebProcess&, TrackPrivateRemoteIdentifier, WebCore::AudioTrackPrivate&, WebCore::MediaPlayerIdentifier);
@@ -79,6 +83,7 @@
     TrackPrivateRemoteIdentifier m_identifier;
     Ref<WebCore::AudioTrackPrivate> m_trackPrivate;
     WebCore::MediaPlayerIdentifier m_mediaPlayerIdentifier;
+    bool m_enabled { false };
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.cpp (277019 => 277020)


--- trunk/Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.cpp	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.cpp	2021-05-05 15:07:05 UTC (rev 277020)
@@ -81,8 +81,11 @@
     ASSERT_NOT_REACHED();
 }
 
-void RemoteVideoTrackProxy::selectedChanged(bool)
+void RemoteVideoTrackProxy::selectedChanged(bool selected)
 {
+    if (m_selected == selected)
+        return;
+    m_selected = selected;
     configurationChanged();
 }
 

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h (277019 => 277020)


--- trunk/Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h	2021-05-05 15:02:12 UTC (rev 277019)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteVideoTrackProxy.h	2021-05-05 15:07:05 UTC (rev 277020)
@@ -58,7 +58,11 @@
     virtual ~RemoteVideoTrackProxy();
 
     TrackPrivateRemoteIdentifier identifier() const { return m_identifier; };
-    void setSelected(bool selected) { m_trackPrivate->setSelected(selected); }
+    void setSelected(bool selected)
+    {
+        m_selected = selected;
+        m_trackPrivate->setSelected(selected);
+    }
 
 private:
     RemoteVideoTrackProxy(GPUConnectionToWebProcess&, TrackPrivateRemoteIdentifier, WebCore::VideoTrackPrivate&, WebCore::MediaPlayerIdentifier);
@@ -79,6 +83,7 @@
     TrackPrivateRemoteIdentifier m_identifier;
     Ref<WebCore::VideoTrackPrivate> m_trackPrivate;
     WebCore::MediaPlayerIdentifier m_mediaPlayerIdentifier;
+    bool m_selected { false };
 };
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to