Introduce WorkQueue::dispatchSync(), which relies on GCD's dispatch_sync() internally on Cocoa ports.
Created attachment 422875 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Created attachment 422888 [details] Patch
Comment on attachment 422888 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422888&action=review > Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:50 > + dispatch_sync(m_dispatchQueue.get(), makeBlockPtr([protectedThis = makeRef(*this), function = WTFMove(function)] { Do we need to protect this, since we won't return until the dispatch_sync returns?
Created attachment 422932 [details] Patch
Comment on attachment 422932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422932&action=review > Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp:50 > + dispatch_sync(m_dispatchQueue.get(), makeBlockPtr([function = WTFMove(function)] { I don't think we need to make a lambda to wrap this function. makeBlockPtr(WTFMove(function))
Created attachment 422936 [details] Patch
Committed r274286: <https://commits.webkit.org/r274286> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422936 [details].
<rdar://problem/75320966>