Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2439903003: PlzNavigate: Allow frames to fallback to alternative content. (Closed)
Patch Set: Two more test are fixed by this CL. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 06eba94a764b63205987137d32bc4b980f61c73a..138b3b0df2cb4fc3a4899f1e9db535bb3583a001 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5063,6 +5063,14 @@ void RenderFrameImpl::OnFailedNavigation(
common_params, std::unique_ptr<StreamOverrideParameters>(),
frame_->isViewSourceModeEnabled());
+ // On load failure, a frame can ask its owner to render fallback content.
+ // If it is possible, then there is no more need to load an error page.
+ if (frame_->canRenderFallbackContent()) {
+ frame_->loadFailed();
+ browser_side_navigation_pending_ = false;
+ return;
+ }
+
if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) {
// The browser expects this frame to be loading an error page. Inform it
// that the load stopped.

Powered by Google App Engine
This is Rietveld 408576698