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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 552683004: Fix IsRenderFrameLive and use it in RenderFrameHostManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix OpenURLSubframe test Created 6 years, 3 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/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8cf5a0f673200bf3091efd98c5148bbd41fb4a4e..9d60c2d1a749734a18f588d7952f66ed6e6cb397 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1882,13 +1882,16 @@ bool WebContentsImpl::NavigateToPendingEntry(
NavigationController::ReloadType reload_type) {
FrameTreeNode* node = frame_tree_.root();
- // If we are using --site-per-process, we should navigate in the FrameTreeNode
- // specified in the pending entry.
+ // Navigate in the FrameTreeNode specified in the pending entry, if any. This
+ // is currently only used in --site-per-process and tests.
NavigationEntryImpl* pending_entry =
NavigationEntryImpl::FromNavigationEntry(controller_.GetPendingEntry());
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess) &&
- pending_entry->frame_tree_node_id() != -1) {
- node = frame_tree_.FindByID(pending_entry->frame_tree_node_id());
+ if (pending_entry->frame_tree_node_id() != -1) {
+ FrameTreeNode* subframe =
+ frame_tree_.FindByID(pending_entry->frame_tree_node_id());
+ DCHECK(subframe);
+ if (subframe)
+ node = subframe;
}
return node->navigator()->NavigateToPendingEntry(
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698