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

Unified Diff: content/renderer/history_entry.cc

Issue 913223009: Avoid crash in HistoryNode::CloneAndReplace with out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 years, 10 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/history_entry.cc
diff --git a/content/renderer/history_entry.cc b/content/renderer/history_entry.cc
index d1425165a877fdb1b8705dc14eba14dc27bb88a8..7686165f4eea2c131e1cb51a800383429b6277f9 100644
--- a/content/renderer/history_entry.cc
+++ b/content/renderer/history_entry.cc
@@ -86,6 +86,11 @@ HistoryEntry::HistoryNode* HistoryEntry::HistoryNode::CloneAndReplace(
child = child->nextSibling()) {
RenderFrameImpl* child_render_frame =
RenderFrameImpl::FromWebFrame(child);
+ // TODO(creis): A child frame may be a RenderFrameProxy. We should still
+ // process its children, but that will be possible when we move this code
+ // to the browser process in https://crbug.com/236848.
+ if (!child_render_frame)
+ continue;
HistoryNode* child_history_node =
entry_->GetHistoryNodeForFrame(child_render_frame);
if (!child_history_node)
« 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