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

Unified Diff: content/renderer/render_view_impl.cc

Issue 15742019: Avoid DidStopLoading messages from the old renderer process during a transfer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix assumption in test Created 7 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/web_contents/render_view_host_manager.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_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 7f2172b76eafde1f96ae015c7bbe1a412344aa27..c8b10ba805b8cfa7622bf2d474dc7072d30da848 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -5461,9 +5461,6 @@ void RenderViewImpl::OnShouldClose() {
}
void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) {
- // Ensure that no other in-progress navigation continues.
- OnStop();
-
// Only run unload if we're not swapped out yet, but send the ack either way.
if (!is_swapped_out_) {
// Swap this RenderView out so the tab can navigate to a page rendered by a
@@ -5480,6 +5477,10 @@ void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) {
// Swap out and stop sending any IPC messages that are not ACKs.
SetSwappedOut(true);
+ // Ensure that no other in-progress navigation continues, once we've started
+ // filtering the IPCs. We don't want to send a DidStopLoading for this.
Matt Perry 2013/05/28 22:08:06 Not sure I understand the comment. What does "this
Charlie Reis 2013/05/28 22:17:02 The SetSwappedOut line above it starts filtering o
+ OnStop();
+
// Replace the page with a blank dummy URL. The unload handler will not be
// run a second time, thanks to a check in FrameLoader::stopLoading.
// TODO(creis): Need to add a better way to do this that avoids running the
« no previous file with comments | « content/browser/web_contents/render_view_host_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698