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

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

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase past PlzNavigate CL Created 6 years, 4 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
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 d5dc4299fc1638f4cee62f11aa6cf8afc31f591e..608c6e5feabd8d118e68666e258e14c2f5e2751e 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -139,8 +139,6 @@ const int RenderViewHostImpl::kUnloadTimeoutMS = 1000;
// static
bool RenderViewHostImpl::IsRVHStateActive(RenderViewHostImplState rvh_state) {
if (rvh_state == STATE_DEFAULT ||
- rvh_state == STATE_WAITING_FOR_UNLOAD_ACK ||
- rvh_state == STATE_WAITING_FOR_COMMIT ||
rvh_state == STATE_WAITING_FOR_CLOSE)
return true;
return false;
@@ -539,9 +537,6 @@ void RenderViewHostImpl::OnSwappedOut(bool timed_out) {
}
switch (rvh_state_) {
- case STATE_WAITING_FOR_UNLOAD_ACK:
- SetState(STATE_WAITING_FOR_COMMIT);
- break;
case STATE_PENDING_SWAP_OUT:
SetState(STATE_SWAPPED_OUT);
break;
@@ -554,26 +549,6 @@ void RenderViewHostImpl::OnSwappedOut(bool timed_out) {
}
}
-void RenderViewHostImpl::WasSwappedOut(
- const base::Closure& pending_delete_on_swap_out) {
- Send(new ViewMsg_WasSwappedOut(GetRoutingID()));
- if (rvh_state_ == STATE_WAITING_FOR_UNLOAD_ACK) {
- SetState(STATE_PENDING_SWAP_OUT);
- if (!instance_->active_view_count())
- SetPendingShutdown(pending_delete_on_swap_out);
- } else if (rvh_state_ == STATE_WAITING_FOR_COMMIT) {
- SetState(STATE_SWAPPED_OUT);
- } else if (rvh_state_ == STATE_DEFAULT) {
- // When the RenderView is not live, the RenderFrameHostManager will call
- // CommitPending directly, without calling SwapOut on the old RVH. This will
- // cause WasSwappedOut to be called directly on the live old RVH.
- DCHECK(!IsRenderViewLive());
- SetState(STATE_SWAPPED_OUT);
- } else {
- NOTREACHED();
- }
-}
-
void RenderViewHostImpl::SetPendingShutdown(const base::Closure& on_swap_out) {
pending_shutdown_on_swap_out_ = on_swap_out;
SetState(STATE_PENDING_SHUTDOWN);
@@ -1357,8 +1332,7 @@ void RenderViewHostImpl::DidCancelPopupMenu() {
#endif
bool RenderViewHostImpl::IsWaitingForUnloadACK() const {
- return rvh_state_ == STATE_WAITING_FOR_UNLOAD_ACK ||
- rvh_state_ == STATE_WAITING_FOR_CLOSE ||
+ return rvh_state_ == STATE_WAITING_FOR_CLOSE ||
rvh_state_ == STATE_PENDING_SHUTDOWN ||
rvh_state_ == STATE_PENDING_SWAP_OUT;
}
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698