Summary: | Introduce WorkQueue::main() to get the main thread's work queue | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||
Component: | Web Template Framework | Assignee: | Chris Dumez <cdumez> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | achristensen, benjamin, cgarcia, cmarcelo, darin, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, philipj, sam, sergio, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Chris Dumez
2021-03-11 13:53:38 PST
Created attachment 422962 [details]
Patch
Created attachment 422964 [details]
Patch
Created attachment 422967 [details]
Patch
Created attachment 422972 [details]
Patch
Comment on attachment 422972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422972&action=review r=me > Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm:214 > - dispatch_async(dispatch_get_main_queue(), makeBlockPtr([this, strongThis = makeRef(*this), callbackID] { > + WorkQueue::main().dispatch([this, strongThis = makeRef(*this), callbackID] { I wonder about cases like this. Do they use WorkQueue rather than RunLoop for any specific purpose? Perhaps we should just make RunLoop::main() safe to call before main thread initialization, just like WorkQueue::main. (In reply to Geoffrey Garen from comment #5) > Comment on attachment 422972 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=422972&action=review > > r=me > > > Tools/WebKitTestRunner/mac/UIScriptControllerMac.mm:214 > > - dispatch_async(dispatch_get_main_queue(), makeBlockPtr([this, strongThis = makeRef(*this), callbackID] { > > + WorkQueue::main().dispatch([this, strongThis = makeRef(*this), callbackID] { > > I wonder about cases like this. Do they use WorkQueue rather than RunLoop > for any specific purpose? Perhaps we should just make RunLoop::main() safe > to call before main thread initialization, just like WorkQueue::main. There is a CFRunLoopGetMain() so in theory, we should be able to get RunLoop::main() working before main thread initialization? Right, I think so. Comment on attachment 422972 [details] Patch Clearing flags on attachment: 422972 Committed r274307 (235201@main): <https://commits.webkit.org/235201@main> All reviewed patches have been landed. Closing bug. |