Title: [250773] trunk/Source/WebKit
- Revision
- 250773
- Author
- [email protected]
- Date
- 2019-10-07 07:14:12 -0700 (Mon, 07 Oct 2019)
Log Message
WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMediaPermissionRequestManager
https://bugs.webkit.org/show_bug.cgi?id=202628
<rdar://problem/55935091>
Reviewed by Eric Carlson.
On process swap on navigation or process crash, m_userMediaPermissionRequestManager is made null.
At the same time, the media state is set back to not playing.
Future calls of updatePlayingMediaDidChange should not have any capture state change until getUserMedia/getDisplayMedia
is called, which would create m_userMediaPermissionRequestManager.
But this assumption is not always true given that the media state is computed as process-wide in MediaStreamTrack::captureState on iOS.
The above behavior is fixed as part of https://bugs.webkit.org/show_bug.cgi?id=202627.
Since the call to updatePlayingMediaDidChange is triggered straight from IPC, it should not be trusted and a null check should be added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updatePlayingMediaDidChange):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (250772 => 250773)
--- trunk/Source/WebKit/ChangeLog 2019-10-07 11:21:43 UTC (rev 250772)
+++ trunk/Source/WebKit/ChangeLog 2019-10-07 14:14:12 UTC (rev 250773)
@@ -1,3 +1,22 @@
+2019-10-07 youenn fablet <[email protected]>
+
+ WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMediaPermissionRequestManager
+ https://bugs.webkit.org/show_bug.cgi?id=202628
+ <rdar://problem/55935091>
+
+ Reviewed by Eric Carlson.
+
+ On process swap on navigation or process crash, m_userMediaPermissionRequestManager is made null.
+ At the same time, the media state is set back to not playing.
+ Future calls of updatePlayingMediaDidChange should not have any capture state change until getUserMedia/getDisplayMedia
+ is called, which would create m_userMediaPermissionRequestManager.
+ But this assumption is not always true given that the media state is computed as process-wide in MediaStreamTrack::captureState on iOS.
+ The above behavior is fixed as part of https://bugs.webkit.org/show_bug.cgi?id=202627.
+ Since the call to updatePlayingMediaDidChange is triggered straight from IPC, it should not be trusted and a null check should be added.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::updatePlayingMediaDidChange):
+
2019-10-04 Dean Jackson <[email protected]>
Use a better name than allowFastClicksEverywhere
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (250772 => 250773)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-10-07 11:21:43 UTC (rev 250772)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-10-07 14:14:12 UTC (rev 250773)
@@ -8306,7 +8306,9 @@
#if ENABLE(MEDIA_STREAM)
if (oldMediaCaptureState != newMediaCaptureState) {
m_uiClient->mediaCaptureStateDidChange(m_mediaState);
- m_userMediaPermissionRequestManager->captureStateChanged(oldMediaCaptureState, newMediaCaptureState);
+ ASSERT(m_userMediaPermissionRequestManager);
+ if (m_userMediaPermissionRequestManager)
+ m_userMediaPermissionRequestManager->captureStateChanged(oldMediaCaptureState, newMediaCaptureState);
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes