Skip to content

Commit

Permalink
Cherry-pick a4b39a8. rdar://125363034
Browse files Browse the repository at this point in the history
    REGRESSION(276505@main) reloading after crashing registers RegistrableDomain as a public suffix
    https://bugs.webkit.org/show_bug.cgi?id=271662
    rdar://125363034

    Reviewed by Sihui Liu.

    topPrivatelyControlledDomain was actually unused, but what we should be sending as a public suffix
    should actually be a public suffix.

    * Source/WebKit/UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::launchProcessForReload):

    Canonical link: https://commits.webkit.org/276635@main

Identifier: 276609.4@safari-7619.1.7-branch
  • Loading branch information
achristensen07 authored and MyahCobbs committed Mar 26, 2024
1 parent b5b2e07 commit 6b63850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/WebKit/UIProcess/WebPageProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,10 +1427,10 @@ RefPtr<API::Navigation> WebPageProxy::launchProcessForReload()
internals().pageLoadState.setPendingAPIRequest(transaction, { navigation->navigationID(), url });
}

auto topPrivatelyControlledDomain = WebCore::PublicSuffixStore::singleton().topPrivatelyControlledDomain(URL(m_backForwardList->currentItem()->url()).host().toString());
auto publicSuffix = WebCore::PublicSuffixStore::singleton().publicSuffix(URL(m_backForwardList->currentItem()->url()).host().toString());

// We allow stale content when reloading a WebProcess that's been killed or crashed.
send(Messages::WebPage::GoToBackForwardItem({ navigation->navigationID(), m_backForwardList->currentItem()->itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, std::nullopt, m_lastNavigationWasAppInitiated, std::nullopt, topPrivatelyControlledDomain, { } }));
send(Messages::WebPage::GoToBackForwardItem({ navigation->navigationID(), m_backForwardList->currentItem()->itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, std::nullopt, m_lastNavigationWasAppInitiated, std::nullopt, publicSuffix, { } }));
m_process->startResponsivenessTimer();

if (shouldForceForegroundPriorityForClientNavigation())
Expand Down

0 comments on commit 6b63850

Please sign in to comment.