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

Unified Diff: content/common/swapped_out_messages.cc

Issue 9271054: Send replies to sync IPCs from swapped out renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test on Mac/Win Created 8 years, 11 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/common/swapped_out_messages.cc
diff --git a/content/common/swapped_out_messages.cc b/content/common/swapped_out_messages.cc
index 3189d19f7f7cc5aaedbbc20b856610c33aabc249..16c58e10d4385bfa34d29b1cdb63556610181723 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;

Powered by Google App Engine
This is Rietveld 408576698