Changeset 256432 in webkit
- Timestamp:
- Feb 12, 2020 7:32:51 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r256426 r256432 1 2020-02-12 Youenn Fablet <youenn@apple.com> 2 3 WebSWServerConnection::registerServiceWorkerClient is not sending IPC message to UIProcess when it should 4 https://bugs.webkit.org/show_bug.cgi?id=207537 5 6 Reviewed by Chris Dumez. 7 8 Covered by added API test. 9 10 * NetworkProcess/ServiceWorker/WebSWServerConnection.cpp: 11 (WebKit::WebSWServerConnection::registerServiceWorkerClient): 12 Fix use after move so that we can get the context connection and send the IPC message to UIProcess as expected. 13 1 14 2020-02-11 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
r256383 r256432 314 314 return contextOrigin != origin.clientOrigin; 315 315 }); 316 auto* contextConnection = isNewOrigin ? server().contextConnectionForRegistrableDomain(RegistrableDomain { contextOrigin }) : nullptr; 316 317 317 318 auto clientOrigin = ClientOrigin { WTFMove(topOrigin), WTFMove(contextOrigin) }; … … 322 323 updateThrottleState(); 323 324 324 if (isNewOrigin) { 325 if (auto* contextConnection = server().contextConnectionForRegistrableDomain(RegistrableDomain { contextOrigin })) { 326 auto& connection = static_cast<WebSWServerToContextConnection&>(*contextConnection); 327 m_networkProcess->parentProcessConnection()->send(Messages::NetworkProcessProxy::RegisterServiceWorkerClientProcess { identifier(), connection.webProcessIdentifier() }, 0); 328 } 325 if (contextConnection) { 326 auto& connection = static_cast<WebSWServerToContextConnection&>(*contextConnection); 327 m_networkProcess->parentProcessConnection()->send(Messages::NetworkProcessProxy::RegisterServiceWorkerClientProcess { identifier(), connection.webProcessIdentifier() }, 0); 329 328 } 330 329 } -
trunk/Tools/ChangeLog
r256395 r256432 1 2020-02-12 Youenn Fablet <youenn@apple.com> 2 3 WebSWServerConnection::registerServiceWorkerClient is not sending IPC message to UIProcess when it should 4 https://bugs.webkit.org/show_bug.cgi?id=207537 5 6 Reviewed by Chris Dumez. 7 8 * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: 9 1 10 2020-02-11 Rob Buis <rbuis@igalia.com> 2 11 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm
r256383 r256432 1677 1677 waitUntilServiceWorkerProcessBackgroundActivityState(webView.get(), false); 1678 1678 waitUntilServiceWorkerProcessForegroundActivityState(webView.get(), false); 1679 1680 auto webView2 = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); 1681 1682 [webView2 loadRequest:server.request()]; 1683 1684 [webView _close]; 1685 webView = nullptr; 1686 1687 // The service worker process should take activity based on webView2 process. 1688 [webView2 _setAssertionStateForTesting: 1]; 1689 while (webView2.get()._hasServiceWorkerForegroundActivityForTesting || !webView2.get()._hasServiceWorkerBackgroundActivityForTesting) { 1690 [webView2 _setAssertionStateForTesting: 1]; 1691 TestWebKitAPI::Util::spinRunLoop(1); 1692 } 1693 1694 while (!webView2.get()._hasServiceWorkerForegroundActivityForTesting || webView2.get()._hasServiceWorkerBackgroundActivityForTesting) { 1695 [webView2 _setAssertionStateForTesting: 3]; 1696 TestWebKitAPI::Util::spinRunLoop(1); 1697 } 1698 1699 while (webView2.get()._hasServiceWorkerForegroundActivityForTesting || webView2.get()._hasServiceWorkerBackgroundActivityForTesting) { 1700 [webView2 _setAssertionStateForTesting: 0]; 1701 TestWebKitAPI::Util::spinRunLoop(1); 1702 } 1679 1703 } 1680 1704
Note: See TracChangeset
for help on using the changeset viewer.