Title: [251355] branches/safari-608-branch/Source/WebKit
- Revision
- 251355
- Author
- [email protected]
- Date
- 2019-10-20 17:44:30 -0700 (Sun, 20 Oct 2019)
Log Message
Cherry-pick r250773. rdar://problem/56271900
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (251354 => 251355)
--- branches/safari-608-branch/Source/WebKit/ChangeLog 2019-10-21 00:44:26 UTC (rev 251354)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog 2019-10-21 00:44:30 UTC (rev 251355)
@@ -1,5 +1,48 @@
2019-10-20 Babak Shafiei <[email protected]>
+ Cherry-pick r250773. rdar://problem/56271900
+
+ 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):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-20 Babak Shafiei <[email protected]>
+
Apply patch. rdar://problem/56427498
2019-10-20 John Wilander <[email protected]>
Modified: branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (251354 => 251355)
--- branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-10-21 00:44:26 UTC (rev 251354)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2019-10-21 00:44:30 UTC (rev 251355)
@@ -8275,7 +8275,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