diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc index 7801a15624fec05e6191909192d7163592e4fa9a..c62e31a4d78ef88158178be09a2bfc8c360837cc 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc @@ -3370,16 +3370,17 @@ base::WeakPtr 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 NavigationThrottlers so we have to // check them explicitly. See bug 913334. if (GetContentClient()->browser()->ShouldBlockRendererDebugURL( - params.url, browser_context_)) { + url, browser_context_)) { DiscardPendingEntry(false); return nullptr; } - HandleRendererDebugURL(node, params.url); + HandleRendererDebugURL(node, url); return nullptr; }