Index: android_webview/common/aw_content_client.cc |
diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc |
index a7b467d8298984ad730d243856b335c50aa8b9bd..053215d6e7a98354a56931fb79f8978703fe82cd 100644 |
--- a/android_webview/common/aw_content_client.cc |
+++ b/android_webview/common/aw_content_client.cc |
@@ -5,6 +5,7 @@ |
#include "android_webview/common/aw_content_client.h" |
#include "base/basictypes.h" |
+#include "ipc/ipc_message.h" |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "webkit/user_agent/user_agent_util.h" |
@@ -35,4 +36,12 @@ base::StringPiece AwContentClient::GetDataResource( |
resource_id, scale_factor); |
} |
+bool AwContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { |
+ // For legacy API support we perform a few browser -> renderer synchronous IPC |
+ // messages that block the browser. However, the synchronous IPC replies might |
+ // be dropped by the renderer during a swap out, deadlocking the browser. |
+ // Because of this we should never drop any synchronous IPC replies. |
+ return message->type() == IPC_REPLY_ID; |
+} |
+ |
} // namespace android_webview |