RESOLVED FIXED 214988
Update service worker if certificate info does not match when soft updating
https://bugs.webkit.org/show_bug.cgi?id=214988
Summary Update service worker if certificate info does not match when soft updating
youenn fablet
Reported 2020-07-30 13:46:46 PDT
Update service worker if certificate info does not match when soft updating
Attachments
Patch (10.20 KB, patch)
2020-07-30 13:48 PDT, youenn fablet
no flags
Patch (28.75 KB, patch)
2020-07-31 02:37 PDT, youenn fablet
no flags
Patch for landing (29.21 KB, patch)
2020-07-31 10:04 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2020-07-30 13:48:41 PDT
youenn fablet
Comment 2 2020-07-31 02:37:45 PDT
Radar WebKit Bug Importer
Comment 3 2020-07-31 03:20:57 PDT
Alex Christensen
Comment 4 2020-07-31 09:49:01 PDT
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.
Alex Christensen
Comment 5 2020-07-31 09:49:44 PDT
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?
youenn fablet
Comment 6 2020-07-31 10:04:04 PDT
(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
youenn fablet
Comment 7 2020-07-31 10:04:44 PDT
Created attachment 405701 [details] Patch for landing
EWS
Comment 8 2020-07-31 10:54:52 PDT
Committed r265150: <https://trac.webkit.org/changeset/265150> All reviewed patches have been landed. Closing bug and clearing flags on attachment 405701 [details].
Fujii Hironori
Comment 9 2020-07-31 11:38:41 PDT
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]
Alex Christensen
Comment 10 2020-07-31 12:39:36 PDT
youenn fablet
Comment 11 2020-07-31 12:50:19 PDT
Thanks!
Note You need to log in before you can comment on or make changes to this bug.