Bug 223105

Summary: Introduce ensureOnMainThread()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, benjamin, calvaris, cfleizach, changseok, cmarcelo, darin, dmazzoni, eric.carlson, esprehn+autocc, ews-watchlist, galpeter, glenn, gyuyoung.kim, hta, jcraig, jdiggs, jer.noble, kangil.han, mmaxfield, philipj, samuel_white, sergio, tommyw, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=223094
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2021-03-11 17:32:42 PST
Introduce ensureOnMainThread(), similarly to the recently added ensureOnMainThreadRunLoop(). It runs the task synchronously when on the main thread, otherwise dispatches the task to the main thread.
Attachments
Patch (30.76 KB, patch)
2021-03-11 17:34 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-03-11 17:34:27 PST
Darin Adler
Comment 2 2021-03-11 19:26:14 PST
Comment on attachment 423001 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423001&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:-171 > -static void ensureOnMainThread(Function<void()>&& f) Wow, would you look at that? Someone had the good name idea already!
EWS
Comment 3 2021-03-11 20:48:29 PST
Committed r274324: <https://commits.webkit.org/r274324> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423001 [details].
Radar WebKit Bug Importer
Comment 4 2021-03-11 20:49:14 PST
Note You need to log in before you can comment on or make changes to this bug.