Created attachment 414575 [details] Untested patch It seems our WebDriver code uses the new soup_server_listen APIs from 2.48, so the code added in bug 146165 is no longer correct, we should really require 2.48 or higher.
Created attachment 414576 [details] Untested patch
Created attachment 414577 [details] Untested patch
Comment on attachment 414577 [details] Untested patch Please take a look. Disclaimer: I haven't use glib for a long time, hopefully I haven't misused the API.
Created attachment 414660 [details] Patch
Committed r270074: <https://trac.webkit.org/changeset/270074> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414660 [details].
<rdar://problem/71620310>
Re-opened since this is blocked by bug 220922
Created attachment 418858 [details] Patch
Comment on attachment 418858 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418858&action=review > Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:35 > + m_soupServer = adoptGRef(soup_server_new("server-header", "WebKitTestServer ", nullptr)); If options[ServerRunInThread] is set, I would go even further and create this on the WorkQueue thread using your trick with BinarySemaphore to dispatch a function and wait until it completes. Sharing m_soupServer across threads like the current code does might work in practice, but I doubt it's safe.
(In reply to Michael Catanzaro from comment #9) > Comment on attachment 418858 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=418858&action=review > > > Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:35 > > + m_soupServer = adoptGRef(soup_server_new("server-header", "WebKitTestServer ", nullptr)); > > If options[ServerRunInThread] is set, I would go even further and create > this on the WorkQueue thread using your trick with BinarySemaphore to > dispatch a function and wait until it completes. Sharing m_soupServer across > threads like the current code does might work in practice, but I doubt it's > safe. Well, the creation and run happen before any test start, so it should be safe, I would say. We don't even need the run, and server callback could be a constructor parameter, but that would require all the tests and I don't think it's worth it.
I just like to be paranoid about sharing objects across threads. Anyway, it's probably OK. You have r+.
Committed r272195: <https://trac.webkit.org/changeset/272195>