Commit 4cdb1559 authored by benhansen's avatar benhansen Committed by Commit bot

Revert "Hold the Pepper proxy lock for all Pepper GL calls."

This reverts commit 5a9a39b7.

The commit is causing ARC apps to deadlock.

BUG=435414

Review URL: https://codereview.chromium.org/774763005

Cr-Commit-Position: refs/heads/master@{#307059}
parent 77b8ce75
...@@ -211,15 +211,6 @@ bool PluginDispatcher::Send(IPC::Message* msg) { ...@@ -211,15 +211,6 @@ bool PluginDispatcher::Send(IPC::Message* msg) {
return SendMessage(msg); return SendMessage(msg);
} }
bool PluginDispatcher::SendAndStayLocked(IPC::Message* msg) {
TRACE_EVENT2("ppapi proxy", "PluginDispatcher::SendAndStayLocked",
"Class", IPC_MESSAGE_ID_CLASS(msg->type()),
"Line", IPC_MESSAGE_ID_LINE(msg->type()));
if (!msg->is_reply())
msg->set_unblock(true);
return SendMessage(msg);
}
bool PluginDispatcher::OnMessageReceived(const IPC::Message& msg) { bool PluginDispatcher::OnMessageReceived(const IPC::Message& msg) {
// We need to grab the proxy lock to ensure that we don't collide with the // We need to grab the proxy lock to ensure that we don't collide with the
// plugin making pepper calls on a different thread. // plugin making pepper calls on a different thread.
......
...@@ -140,15 +140,12 @@ class PPAPI_PROXY_EXPORT PluginDispatcher ...@@ -140,15 +140,12 @@ class PPAPI_PROXY_EXPORT PluginDispatcher
bool is_client); bool is_client);
// Dispatcher overrides. // Dispatcher overrides.
bool IsPlugin() const override; virtual bool IsPlugin() const;
bool Send(IPC::Message* msg) override; virtual bool Send(IPC::Message* msg);
// Unlike |Send()|, this function continues to hold the Pepper proxy lock
// unconditionally.
bool SendAndStayLocked(IPC::Message* msg) override;
// IPC::Listener implementation. // IPC::Listener implementation.
bool OnMessageReceived(const IPC::Message& msg) override; virtual bool OnMessageReceived(const IPC::Message& msg);
void OnChannelError() override; virtual void OnChannelError();
// Keeps track of which dispatcher to use for each instance, active instances // Keeps track of which dispatcher to use for each instance, active instances
// and tracks associated data like the current size. // and tracks associated data like the current size.
......
...@@ -219,10 +219,7 @@ int32 PpapiCommandBufferProxy::CreateGpuMemoryBufferImage( ...@@ -219,10 +219,7 @@ int32 PpapiCommandBufferProxy::CreateGpuMemoryBufferImage(
bool PpapiCommandBufferProxy::Send(IPC::Message* msg) { bool PpapiCommandBufferProxy::Send(IPC::Message* msg) {
DCHECK(last_state_.error == gpu::error::kNoError); DCHECK(last_state_.error == gpu::error::kNoError);
// We need hold the Pepper proxy lock for sync IPC, because GPU command buffer if (channel_->Send(msg))
// may use a sync IPC with another lock held. It may cause deadlock.
// http://crbug.com/418651
if (channel_->SendAndStayLocked(msg))
return true; return true;
last_state_.error = gpu::error::kLostContext; last_state_.error = gpu::error::kLostContext;
......
...@@ -85,9 +85,5 @@ bool ProxyChannel::Send(IPC::Message* msg) { ...@@ -85,9 +85,5 @@ bool ProxyChannel::Send(IPC::Message* msg) {
return false; return false;
} }
bool ProxyChannel::SendAndStayLocked(IPC::Message* msg) {
return Send(msg);
}
} // namespace proxy } // namespace proxy
} // namespace ppapi } // namespace ppapi
...@@ -73,8 +73,6 @@ class PPAPI_PROXY_EXPORT ProxyChannel ...@@ -73,8 +73,6 @@ class PPAPI_PROXY_EXPORT ProxyChannel
// IPC::Sender implementation. // IPC::Sender implementation.
virtual bool Send(IPC::Message* msg) override; virtual bool Send(IPC::Message* msg) override;
virtual bool SendAndStayLocked(IPC::Message* msg);
// IPC::Listener implementation. // IPC::Listener implementation.
virtual void OnChannelError() override; virtual void OnChannelError() override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment