Update service worker if certificate info does not match when soft updating
Created attachment 405611 [details] Patch
Created attachment 405678 [details] Patch
<rdar://problem/66373182>
Comment on attachment 405678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405678&action=review > Tools/TestWebKitAPI/cocoa/HTTPServer.h:49 > + HTTPServer(std::initializer_list<std::pair<String, HTTPResponse>>, Protocol = Protocol::Http, CertificateVerifier&& = nullptr, RetainPtr<SecIdentityRef>&& = nullptr, const String& port = { }); port should be an Optional<uint16_t> and we should do makeString in HTTPServer instead of String::number in the test. > Tools/TestWebKitAPI/cocoa/HTTPServer.h:60 > + static RetainPtr<nw_parameters_t> listenerParameters(Protocol, CertificateVerifier&&, RetainPtr<SecIdentityRef>&& = nullptr, const String& port = { }); Default parameters are probably unnecessary here. > Tools/TestWebKitAPI/cocoa/HTTPServer.mm:57 > + if (!customTestIdentity) We only need this if protocol is not Protocol::Http.
Comment on attachment 405678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=405678&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:2242 > + " while (++counter < 20 && (!registration.installing && !registration.waiting))" > + " await new Promise(resolve => setTimeout(resolve, 50));" Also, this looks like it may become flaky on slow bots. Is there a more direct way to do this?
(In reply to Alex Christensen from comment #5) > Comment on attachment 405678 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=405678&action=review > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:2242 > > + " while (++counter < 20 && (!registration.installing && !registration.waiting))" > > + " await new Promise(resolve => setTimeout(resolve, 50));" > > Also, this looks like it may become flaky on slow bots. Is there a more > direct way to do this? OK, will use an event + setTimeout in case event is too slow/is not fired
Created attachment 405701 [details] Patch for landing
Committed r265150: <https://trac.webkit.org/changeset/265150> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405701 [details].
AppleWin port can't compile since this change. EWS reported: C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\platform\network\cf\CertificateInfo.h(100,38): message : The initializer contains too many elements (compiling source file C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\loader\archive\cf\LegacyWebArchive.cpp) [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\platform\network\cf\CertificateInfo.h(100,39): error C2065: 'SecTrustRef': undeclared identifier (compiling source file C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\loader\cf\ResourceLoaderCFNet.cpp) [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\platform\network\cf\CertificateInfo.h(100,52): error C2065: 'SecTrustRef': undeclared identifier (compiling source file C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\loader\cf\ResourceLoaderCFNet.cpp) [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\platform\network\cf\CertificateInfo.h(100,64): error C2440: 'initializing': cannot convert from 'initializer list' to 'bool' (compiling source file C:\cygwin\home\buildbot\worker\Windows-EWS\build\Source\WebCore\loader\cf\ResourceLoaderCFNet.cpp) [C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj]
http://trac.webkit.org/r265155
Thanks!