Bug 202628 - WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMediaPermissionRequestManager
Summary: WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-07 03:19 PDT by youenn fablet
Modified: 2019-10-07 07:14 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2019-10-07 03:52 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.