Bug 219622 - [Media in GPU Process][MSE] The GPU Process may crash in the destructor of MediaPlayerPrivateMediaSourceAVFObjC
Summary: [Media in GPU Process][MSE] The GPU Process may crash in the destructor of Me...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-12-07 17:47 PST by Peng Liu
Modified: 2020-12-08 16:57 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2020-12-07 17:52 PST, Peng Liu
no flags Details | Formatted Diff | Diff
Patch (7.46 KB, patch)
2020-12-08 09:50 PST, Peng Liu
eric.carlson: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Fix GTK/WPE build failures (8.26 KB, patch)
2020-12-08 10:19 PST, Peng Liu
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Fix a build failure on the wincairo port (9.12 KB, patch)
2020-12-08 11:44 PST, Peng Liu
no flags Details | Formatted Diff | Diff

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