Bug 204030

Summary: Make MediaStream/MediaStreamTrack page cache friendly
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, rniwa, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description youenn fablet 2019-11-08 16:30:02 PST
Make MediaStream/MediaStreamTrack page cache friendly
Comment 1 youenn fablet 2019-11-08 17:10:58 PST
Created attachment 383183 [details]
Patch
Comment 2 youenn fablet 2019-11-08 18:47:30 PST
Created attachment 383192 [details]
Patch
Comment 3 Chris Dumez 2019-11-08 18:58:53 PST
Comment on attachment 383192 [details]
Patch

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

> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:578
> +    scriptExecutionContext()->postTask([this, pendingActivity = makePendingActivity(*this)](auto&) {

We're not supposed to use postTask() anymore. Please use the HTML event loop by calling queueTaskToDispatchEvent().

Also, because the HTML event loop is page-cache compliant, you can call queueTaskToDispatchEvent() in suspend() and then you don't need a resume() method or the m_isSuspendedForBackForwardCache flag.
Comment 4 youenn fablet 2019-11-11 09:37:35 PST
Created attachment 383276 [details]
Patch
Comment 5 youenn fablet 2019-11-11 09:58:58 PST
Created attachment 383278 [details]
Patch
Comment 6 Chris Dumez 2019-11-11 10:06:35 PST
Comment on attachment 383278 [details]
Patch

r=me if the bots are happy.
Comment 7 WebKit Commit Bot 2019-11-11 13:41:17 PST
Comment on attachment 383278 [details]
Patch

Clearing flags on attachment: 383278

Committed r252337: <https://trac.webkit.org/changeset/252337>
Comment 8 WebKit Commit Bot 2019-11-11 13:41:19 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Chris Dumez 2019-11-26 11:03:56 PST
*** Bug 203094 has been marked as a duplicate of this bug. ***
Comment 10 Radar WebKit Bug Importer 2019-11-26 11:04:17 PST
<rdar://problem/57493528>