From a55811b84dd72cce059c9274e4c716ef4621a466 Mon Sep 17 00:00:00 2001 From: Amol Virnodkar Date: Mon, 29 Jul 2024 10:45:01 +0530 Subject: [PATCH] =?UTF-8?q?ONEM-35907=20:=20[WPE2.38]=20-=20Tetris=20app?= =?UTF-8?q?=20shows=20black=20screen=20while=20opening=20ARRISEOS-45743=20?= =?UTF-8?q?:=20[WPE2.38][RDK16]=20Sometimes=20set=20URL=20from=20Thunder?= =?UTF-8?q?=20fails.=E2=80=8B=E2=80=8B=E2=80=8B=E2=80=8B=E2=80=8B=E2=80=8B?= =?UTF-8?q?=E2=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix for an assert crash in WPE 2.42 --- .../WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp index eff7e85973e0a..2cdb167411741 100644 --- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp @@ -1022,7 +1022,9 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const Navigat // the provisional load's DocumentLoader needs to receive navigation policy decisions. We need a better model for this state. documentLoader = static_cast(coreFrame->loader().provisionalDocumentLoader()); } - if (!documentLoader) + // PolicyDecisionMode::Synchronous means that it is a FragmentNavigation and in that case we should use documentLoader, + // because there can be ongoing (in policy or provisional state) navigation. + if (!documentLoader || policyDecisionMode == PolicyDecisionMode::Synchronous) documentLoader = static_cast(coreFrame->loader().documentLoader()); navigationActionData.clientRedirectSourceForHistory = documentLoader->clientRedirectSourceForHistory();