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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 196133032: Add test for filtering of IPC messages when RenderFrameHost is swapped out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing url_chain and comment. Created 6 years, 9 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/frame_host/render_frame_host_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 8fd67698e877254e071bf0c741f55eef038cc2af..c9704c31d1410937ba79f385fb7a27b59fb089ad 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -577,6 +577,11 @@ void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
}
void RenderViewHostImpl::SwapOut() {
+ // If this RenderViewHost is not in the default state, it must have already
+ // gone through this, therefore just return.
+ if (rvh_state_ != STATE_DEFAULT)
+ return;
+
SetState(STATE_WAITING_FOR_UNLOAD_ACK);
unload_event_monitor_timeout_->Start(
base::TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698