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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2901093006: Use has_committed_real_load for main frames in addition to subframes. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index bf90b0ae15404e326ea89b1e84085293b60788ed..cdf68fcf1dfd89467cb96a6798e4e3f955397b01 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5272,11 +5272,11 @@ void RenderFrameImpl::OnFailedNavigation(
GetContentClient()->SetActiveURL(common_params.url);
- // If this frame isn't in the same process as the main frame, it may naively
- // assume that this is the first navigation in the iframe, but this may not
- // actually be the case. Inform the frame's state machine if this frame has
- // already committed other loads.
- if (request_params.has_committed_real_load && frame_->Parent())
+ // If this frame is navigating cross-process, it may naively assume that this
+ // is the first navigation in the frame, but this may not actually be the
+ // case. Inform the frame's state machine if this frame has already committed
+ // other loads.
+ if (request_params.has_committed_real_load)
frame_->SetCommittedFirstRealLoad();
pending_navigation_params_.reset(new NavigationParams(
@@ -6029,11 +6029,11 @@ void RenderFrameImpl::NavigateInternal(
GetContentClient()->SetActiveURL(common_params.url);
- // If this frame isn't in the same process as the main frame, it may naively
- // assume that this is the first navigation in the iframe, but this may not
- // actually be the case. Inform the frame's state machine if this frame has
- // already committed other loads.
- if (request_params.has_committed_real_load && frame_->Parent())
+ // If this frame is navigating cross-process, it may naively assume that this
+ // is the first navigation in the frame, but this may not actually be the
+ // case. Inform the frame's state machine if this frame has already committed
+ // other loads.
+ if (request_params.has_committed_real_load)
frame_->SetCommittedFirstRealLoad();
if (is_reload && current_history_item_.IsNull()) {
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698