Modified: branches/safari-612-branch/Source/WebKit/ChangeLog (283922 => 283923)
--- branches/safari-612-branch/Source/WebKit/ChangeLog 2021-10-11 19:30:19 UTC (rev 283922)
+++ branches/safari-612-branch/Source/WebKit/ChangeLog 2021-10-11 19:34:30 UTC (rev 283923)
@@ -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-16 Chris Dumez <[email protected]>
Add violations reporting support for Cross-Origin-Embedder-Policy
Modified: branches/safari-612-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (283922 => 283923)
--- branches/safari-612-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-10-11 19:30:19 UTC (rev 283922)
+++ branches/safari-612-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-10-11 19:34:30 UTC (rev 283923)
@@ -5661,16 +5661,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);
});