Bug 226543

Summary: Port media code to the HTML event loop
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: MediaAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, calvaris, changseok, dino, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, graouts, gyuyoung.kim, jer.noble, kangil.han, kondapallykalyan, mmaxfield, peng.liu6, philipj, rniwa, ryuan.choi, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
ews-feeder: commit-queue-
WIP Patch
ews-feeder: commit-queue-
WIP Patch
none
Patch
none
Patch none

Description Chris Dumez 2021-06-02 10:14:55 PDT
Port MainThreadGenericEventQueue to the HTML event loop.
Comment 1 Chris Dumez 2021-06-02 10:16:23 PDT
Created attachment 430372 [details]
WIP Patch
Comment 2 Chris Dumez 2021-06-02 12:22:07 PDT
Created attachment 430388 [details]
WIP Patch
Comment 3 Chris Dumez 2021-06-02 12:51:47 PDT
Created attachment 430393 [details]
WIP Patch
Comment 4 Chris Dumez 2021-06-02 14:44:12 PDT
Created attachment 430410 [details]
Patch
Comment 5 Ryosuke Niwa 2021-06-02 16:51:52 PDT
Comment on attachment 430410 [details]
Patch

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

> Source/WebCore/platform/DeferrableTask.h:109
> +        scriptExecutionContext()->eventLoop().queueTask(TaskSource::MediaElement, [weakThis = makeWeakPtr(*this), task = WTFMove(task)] {

Not in this patch but we should add the capability to cancel a task we scheduled in the event loop.
Comment 6 Peng Liu 2021-06-02 17:01:07 PDT
Comment on attachment 430410 [details]
Patch

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

> Source/WebCore/platform/DeferrableTask.h:57
> +    bool m_hasPendingTask { false };

Nit. `m_isPending` seems better?
Comment 7 Chris Dumez 2021-06-02 17:38:43 PDT
Created attachment 430425 [details]
Patch
Comment 8 EWS 2021-06-02 18:54:43 PDT
Committed r278392 (238417@main): <https://commits.webkit.org/238417@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 430425 [details].
Comment 9 Radar WebKit Bug Importer 2021-06-02 18:55:18 PDT
<rdar://problem/78793607>