Files
brave-core/patches/content-browser-renderer_host-navigation_controller_impl.cc.patch
T

26 lines
1.3 KiB
Diff

diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index 75acab9c4c4dc9d4c9c8b24e844f1c14466d4185..3c88025af14134df7af2148c4298beba4d5ca267 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -3987,16 +3987,17 @@ base::WeakPtr<NavigationHandle> NavigationControllerImpl::NavigateWithoutEntry(
// Note: we intentionally leave the pending entry in place for renderer debug
// URLs, unlike the cases below where we clear it if the navigation doesn't
// proceed.
- if (blink::IsRendererDebugURL(params.url)) {
+ const GURL url = params.url.SchemeIs(url::kJavaScriptScheme) ? params.url : pending_entry_->GetURL();
+ if (blink::IsRendererDebugURL(url)) {
// Renderer-debug URLs won't go through NavigationThrottles so we have to
// check them explicitly. See crbug.com/40605746.
if (GetContentClient()->browser()->ShouldBlockRendererDebugURL(
- params.url, browser_context_, node->current_frame_host())) {
+ url, browser_context_, node->current_frame_host())) {
DiscardPendingEntry(false);
return nullptr;
}
- HandleRendererDebugURL(node, params.url);
+ HandleRendererDebugURL(node, url);
return nullptr;
}