summaryrefslogtreecommitdiffstats
path: root/content/common/swapped_out_messages.cc
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-28 03:09:34 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-28 03:09:34 +0000
commitfedec01f1b3e16379cbd12f0885f1286cb97c06f (patch)
tree77bd6e3c9de3116e7bd26efa874480d7afc7ff0f /content/common/swapped_out_messages.cc
parent9370e4382dd2435ae3207a2aa848c5a822208131 (diff)
downloadchromium_src-fedec01f1b3e16379cbd12f0885f1286cb97c06f.zip
chromium_src-fedec01f1b3e16379cbd12f0885f1286cb97c06f.tar.gz
chromium_src-fedec01f1b3e16379cbd12f0885f1286cb97c06f.tar.bz2
Send replies to sync IPCs from swapped out renderers.
BUG=93427 TEST=Go back/forward quickly with cross-process navigations. Review URL: http://codereview.chromium.org/9271054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/swapped_out_messages.cc')
-rw-r--r--content/common/swapped_out_messages.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/content/common/swapped_out_messages.cc b/content/common/swapped_out_messages.cc
index 3189d19..16c58e1 100644
--- a/content/common/swapped_out_messages.cc
+++ b/content/common/swapped_out_messages.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -43,6 +43,8 @@ bool SwappedOutMessages::CanHandleWhileSwappedOut(
// We drop most other messages that arrive from a swapped out renderer.
// However, some are important (e.g., ACKs) for keeping the browser and
// renderer state consistent in case we later return to the renderer.
+ // Note that synchronous messages that are not handled will receive an
+ // error reply instead, to avoid leaving the renderer in a stuck state.
switch (msg.type()) {
// Sends an ACK.
case ViewHostMsg_ShowView::ID:
@@ -60,14 +62,11 @@ bool SwappedOutMessages::CanHandleWhileSwappedOut(
case ViewHostMsg_Close::ID:
// Sends an ACK.
case ViewHostMsg_RequestMove::ID:
- // Suppresses dialog and sends an ACK.
- case ViewHostMsg_RunJavaScriptMessage::ID:
- // Suppresses dialog and sends an ACK.
- case ViewHostMsg_RunBeforeUnloadConfirm::ID:
// Sends an ACK.
case ViewHostMsg_AccessibilityNotifications::ID:
#if defined(USE_X11)
- // Synchronous message when leaving a page with plugin.
+ // Synchronous message when leaving a page with plugin. In this case,
+ // we want to destroy the plugin rather than return an error message.
case ViewHostMsg_DestroyPluginContainer::ID:
#endif
return true;