Bug 219622

Summary: [Media in GPU Process][MSE] The GPU Process may crash in the destructor of MediaPlayerPrivateMediaSourceAVFObjC
Product: WebKit Reporter: Peng Liu <peng.liu6>
Component: MediaAssignee: Peng Liu <peng.liu6>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
eric.carlson: review+, ews-feeder: commit-queue-
Fix GTK/WPE build failures
ews-feeder: commit-queue-
Fix a build failure on the wincairo port none

Description Peng Liu 2020-12-07 17:47:17 PST
[Media in GPU Process][MSE] The GPU Process may crash in the destructor of MediaPlayerPrivateMediaSourceAVFObjC
Comment 1 Peng Liu 2020-12-07 17:52:30 PST
Created attachment 415604 [details]
Patch
Comment 2 youenn fablet 2020-12-08 04:29:51 PST
Comment on attachment 415604 [details]
Patch

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

> Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:-60
> -    m_inlineLayerHostingContext->setRootLayer(m_player->platformLayer());

It is not clear why removing this line is fine.
Is it redundant? If so, can you add this info in change log?
Comment 3 Peng Liu 2020-12-08 08:46:29 PST
Comment on attachment 415604 [details]
Patch

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

>> Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:-60
>> -    m_inlineLayerHostingContext->setRootLayer(m_player->platformLayer());
> 
> It is not clear why removing this line is fine.
> Is it redundant? If so, can you add this info in change log?

The purpose of this callback is to notify the DOM that the player's rendering mode is changed, including the case that the layer is destroyed. So I think it was a bug to operate on the layer.
I just realized that we need to forward the callback to the Web process (HTMLMediaElement). I will upload a new patch.
Comment 4 Peng Liu 2020-12-08 09:50:39 PST
Created attachment 415651 [details]
Patch
Comment 5 Peng Liu 2020-12-08 10:19:41 PST
Created attachment 415653 [details]
Fix GTK/WPE build failures
Comment 6 Peng Liu 2020-12-08 11:44:36 PST
Created attachment 415657 [details]
Fix a build failure on the wincairo port
Comment 7 EWS 2020-12-08 16:56:57 PST
Committed r270563: <https://trac.webkit.org/changeset/270563>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 415657 [details].
Comment 8 Radar WebKit Bug Importer 2020-12-08 16:57:19 PST
<rdar://problem/72115808>