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

Side by Side Diff: content/renderer/history_controller.cc

Issue 2023013002: Prevent renderer kills for in-page navigations on subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests and fix, clean up. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 void HistoryController::RecursiveGoToEntry( 129 void HistoryController::RecursiveGoToEntry(
130 WebFrame* frame, 130 WebFrame* frame,
131 HistoryFrameLoadVector& same_document_loads, 131 HistoryFrameLoadVector& same_document_loads,
132 HistoryFrameLoadVector& different_document_loads) { 132 HistoryFrameLoadVector& different_document_loads) {
133 DCHECK(provisional_entry_); 133 DCHECK(provisional_entry_);
134 DCHECK(current_entry_); 134 DCHECK(current_entry_);
135 RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame); 135 RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
136 const WebHistoryItem& new_item = 136 const WebHistoryItem& new_item =
137 provisional_entry_->GetItemForFrame(render_frame); 137 provisional_entry_->GetItemForFrame(render_frame);
138 const WebHistoryItem& old_item = 138 const WebHistoryItem& old_item = render_frame->current_history_item();
Charlie Reis 2016/06/03 19:20:35 This fixes BackTwiceToIframeWithContent in default
Avi (use Gerrit) 2016/06/03 20:26:57 Agreed that this is a fix; is a comment appropriat
Charlie Reis 2016/06/03 20:53:28 Done.
139 current_entry_->GetItemForFrame(render_frame);
140 if (new_item.isNull()) 139 if (new_item.isNull())
141 return; 140 return;
142 141
143 if (old_item.isNull() || 142 if (old_item.isNull() ||
144 new_item.itemSequenceNumber() != old_item.itemSequenceNumber()) { 143 new_item.itemSequenceNumber() != old_item.itemSequenceNumber()) {
145 if (!old_item.isNull() && 144 if (!old_item.isNull() &&
146 new_item.documentSequenceNumber() == 145 new_item.documentSequenceNumber() ==
147 old_item.documentSequenceNumber()) { 146 old_item.documentSequenceNumber()) {
148 same_document_loads.push_back(std::make_pair(frame, new_item)); 147 same_document_loads.push_back(std::make_pair(frame, new_item));
149 148
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 bool clone_children_of_target) { 283 bool clone_children_of_target) {
285 if (!current_entry_) { 284 if (!current_entry_) {
286 current_entry_.reset(new HistoryEntry(new_item)); 285 current_entry_.reset(new HistoryEntry(new_item));
287 } else { 286 } else {
288 current_entry_.reset(current_entry_->CloneAndReplace( 287 current_entry_.reset(current_entry_->CloneAndReplace(
289 new_item, clone_children_of_target, target_frame, render_view_)); 288 new_item, clone_children_of_target, target_frame, render_view_));
290 } 289 }
291 } 290 }
292 291
293 } // namespace content 292 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698