Bug 202628

Summary: WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMediaPermissionRequestManager
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description youenn fablet 2019-10-07 03:19:26 PDT
WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMediaPermissionRequestManager
Comment 1 youenn fablet 2019-10-07 03:19:37 PDT
<rdar://problem/55935091>
Comment 2 youenn fablet 2019-10-07 03:52:31 PDT
Created attachment 380312 [details]
Patch
Comment 3 Eric Carlson 2019-10-07 06:01:53 PDT
Comment on attachment 380312 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380312&action=review

> Source/WebKit/UIProcess/WebPageProxy.cpp:8309
> +        ASSERT(m_userMediaPermissionRequestManager);

If we expect m_userMediaPermissionRequestManager to be NULL some of the time, do we really want an ASSERT here?
Comment 4 youenn fablet 2019-10-07 06:28:50 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 380312 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=380312&action=review
> 
> > Source/WebKit/UIProcess/WebPageProxy.cpp:8309
> > +        ASSERT(m_userMediaPermissionRequestManager);
> 
> If we expect m_userMediaPermissionRequestManager to be NULL some of the
> time, do we really want an ASSERT here?

By design, when nulling m_userMediaPermissionRequestManager, we set back the capture state to none. For the capture state to be different from None, m_userMediaPermissionRequestManager should in theory be recreated.

So we do not expect it to be null but we cannot ignore the fact that a wrong IPC message may happen.
Comment 5 WebKit Commit Bot 2019-10-07 07:14:19 PDT
Comment on attachment 380312 [details]
Patch

Clearing flags on attachment: 380312

Committed r250773: <https://trac.webkit.org/changeset/250773>
Comment 6 WebKit Commit Bot 2019-10-07 07:14:21 PDT
All reviewed patches have been landed.  Closing bug.