Title: [282854] trunk/Source/WebKit
Revision
282854
Author
[email protected]
Date
2021-09-21 17:32:09 -0700 (Tue, 21 Sep 2021)

Log Message

Launch the new process a bit earlier when doing a COOP process-swap
https://bugs.webkit.org/show_bug.cgi?id=230555

Reviewed by Alex Christensen.

Launch the new process a bit earlier when doing a COOP process-swap for better performance.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForResponseShared):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (282853 => 282854)


--- trunk/Source/WebKit/ChangeLog	2021-09-22 00:27:22 UTC (rev 282853)
+++ trunk/Source/WebKit/ChangeLog	2021-09-22 00:32:09 UTC (rev 282854)
@@ -1,3 +1,15 @@
+2021-09-21  Chris Dumez  <[email protected]>
+
+        Launch the new process a bit earlier when doing a COOP process-swap
+        https://bugs.webkit.org/show_bug.cgi?id=230555
+
+        Reviewed by Alex Christensen.
+
+        Launch the new process a bit earlier when doing a COOP process-swap for better performance.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::decidePolicyForResponseShared):
+
 2021-09-21  Alex Christensen  <[email protected]>
 
         Reduce sizeof(NetworkLoadMetrics)

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (282853 => 282854)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-09-22 00:27:22 UTC (rev 282853)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-09-22 00:32:09 UTC (rev 282854)
@@ -5662,16 +5662,15 @@
         auto willContinueLoadInNewProcess = WillContinueLoadInNewProcess::No;
         if (policyAction == PolicyAction::Use && browsingContextGroupSwitchDecision != BrowsingContextGroupSwitchDecision::StayInGroup && navigation) {
             WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "decidePolicyForResponseShared: Process-swapping due to Cross-Origin-Opener-Policy, newProcessIsCrossOriginIsolated=%d", browsingContextGroupSwitchDecision == BrowsingContextGroupSwitchDecision::NewIsolatedGroup);
-            websiteDataStore().networkProcess().prepareLoadForWebProcessTransfer(process->coreProcessIdentifier(), mainResourceLoadIdentifier, [this, protectedThis = WTFMove(protectedThis), navigation, navigationResponse = WTFMove(navigationResponse), sender = WTFMove(sender), browsingContextGroupSwitchDecision](auto existingNetworkResourceLoadIdentifierToResume) mutable {
-                RefPtr<WebProcessProxy> processForNavigation;
-                if (browsingContextGroupSwitchDecision == BrowsingContextGroupSwitchDecision::NewIsolatedGroup)
-                    processForNavigation = m_process->processPool().createNewWebProcess(&websiteDataStore(), WebProcessProxy::IsPrewarmed::No, CrossOriginMode::Isolated);
-                else {
-                    ASSERT(browsingContextGroupSwitchDecision == BrowsingContextGroupSwitchDecision::NewSharedGroup);
-                    RegistrableDomain responseDomain { navigationResponse->response().url() };
-                    processForNavigation = m_process->processPool().processForRegistrableDomain(websiteDataStore(), this, responseDomain);
-                }
-                continueNavigationInNewProcess(*navigation, nullptr, processForNavigation.releaseNonNull(), ProcessSwapRequestedByClient::No, ShouldTreatAsContinuingLoad::YesAfterResponsePolicyDecision, nullptr, existingNetworkResourceLoadIdentifierToResume);
+            RefPtr<WebProcessProxy> processForNavigation;
+            if (browsingContextGroupSwitchDecision == BrowsingContextGroupSwitchDecision::NewIsolatedGroup)
+                processForNavigation = m_process->processPool().createNewWebProcess(&websiteDataStore(), WebProcessProxy::IsPrewarmed::No, CrossOriginMode::Isolated);
+            else {
+                RegistrableDomain responseDomain { navigationResponse->response().url() };
+                processForNavigation = m_process->processPool().processForRegistrableDomain(websiteDataStore(), this, responseDomain);
+            }
+            websiteDataStore().networkProcess().prepareLoadForWebProcessTransfer(process->coreProcessIdentifier(), mainResourceLoadIdentifier, [this, protectedThis = WTFMove(protectedThis), navigation, navigationResponse = WTFMove(navigationResponse), sender = WTFMove(sender), processForNavigation = processForNavigation.releaseNonNull()](auto existingNetworkResourceLoadIdentifierToResume) mutable {
+                continueNavigationInNewProcess(*navigation, nullptr, WTFMove(processForNavigation), ProcessSwapRequestedByClient::No, ShouldTreatAsContinuingLoad::YesAfterResponsePolicyDecision, nullptr, existingNetworkResourceLoadIdentifierToResume);
 
                 receivedPolicyDecision(PolicyAction::Ignore, navigation.get(), nullptr, WTFMove(navigationResponse), WTFMove(sender), { }, WillContinueLoadInNewProcess::Yes);
             });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to