summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 17:41:14 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 17:41:14 +0000
commit6169a57746a51b438b676bc09039c4e8b57debf7 (patch)
tree6d4928bf7709f39954f41927f701a1013b2a4c39 /content/renderer
parent54f3d2cadcdfb92485e3b79054ed42696eeb97f7 (diff)
downloadchromium_src-6169a57746a51b438b676bc09039c4e8b57debf7.zip
chromium_src-6169a57746a51b438b676bc09039c4e8b57debf7.tar.gz
chromium_src-6169a57746a51b438b676bc09039c4e8b57debf7.tar.bz2
Avoid DidStopLoading messages from the old renderer process during a transfer.
BUG=243957 TEST=BrowserTest.NoStopDuringTransferUntilCommit Review URL: https://chromiumcodereview.appspot.com/15742019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/render_view_impl.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index a53c5a1..03d57a6 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -5459,9 +5459,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
@@ -5478,6 +5475,11 @@ void RenderViewImpl::OnSwapOut(const ViewMsg_SwapOut_Params& params) {
// Swap out and stop sending any IPC messages that are not ACKs.
SetSwappedOut(true);
+ // Now that we're swapped out and filtering IPC messages, stop loading to
+ // ensure that no other in-progress navigation continues. We do this here
+ // to avoid sending a DidStopLoading message to the browser process.
+ 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