Index: content/browser/browser_message_filter.cc |
=================================================================== |
--- content/browser/browser_message_filter.cc (revision 79485) |
+++ content/browser/browser_message_filter.cc (working copy) |
@@ -9,7 +9,6 @@ |
#include "base/process_util.h" |
#include "chrome/browser/metrics/user_metrics.h" |
#include "content/common/result_codes.h" |
-#include "ipc/ipc_sync_message.h" |
BrowserMessageFilter::BrowserMessageFilter() |
: channel_(NULL), peer_handle_(base::kNullProcessHandle) { |
@@ -68,9 +67,6 @@ |
if (thread == BrowserThread::IO) |
return DispatchMessage(message); |
- if (thread == BrowserThread::UI && !CheckCanDispatchOnUI(message, this)) |
- return true; |
- |
BrowserThread::PostTask( |
thread, FROM_HERE, |
NewRunnableMethod( |
@@ -94,28 +90,3 @@ |
void BrowserMessageFilter::BadMessageReceived() { |
base::KillProcess(peer_handle(), ResultCodes::KILLED_BAD_MESSAGE, false); |
} |
- |
-bool BrowserMessageFilter::CheckCanDispatchOnUI( |
- const IPC::Message& message, IPC::Message::Sender* sender) { |
-#if defined(OS_WIN) |
- // On Windows there's a potential deadlock with sync messsages going in |
- // a circle from browser -> plugin -> renderer -> browser. |
- // On Linux we can avoid this by avoiding sync messages from browser->plugin. |
- // On Mac we avoid this by not supporting windowed plugins. |
- if (message.is_sync() && !message.is_caller_pumping_messages()) { |
- // NOTE: IF YOU HIT THIS ASSERT, THE SOLUTION IS ALMOST NEVER TO RUN A |
- // NESTED MESSAGE LOOP IN THE RENDERER!!! |
- // That introduces reentrancy which causes hard to track bugs. You should |
- // find a way to either turn this into an asynchronous message, or one |
- // that can be answered on the IO thread. |
- NOTREACHED() << "Can't send sync messages to UI thread without pumping " |
- "messages in the renderer or else deadlocks can occur if the page " |
- "has windowed plugins! (message type " << message.type() << ")"; |
- IPC::Message* reply = IPC::SyncMessage::GenerateReply(&message); |
- reply->set_reply_error(); |
- sender->Send(reply); |
- return false; |
- } |
-#endif |
- return true; |
-} |