summaryrefslogtreecommitdiffstats
path: root/chrome/gpu
diff options
context:
space:
mode:
authoramarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 00:56:02 +0000
committeramarinichev@chromium.org <amarinichev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 00:56:02 +0000
commit0b36a3ee7f6046fd265d7ff3c41a2140fb3e9227 (patch)
tree82cd409ec1307ed91a06bc19e99964cd29c51d2a /chrome/gpu
parent880e036f28e5d0986e67304d36d80e7728704f07 (diff)
downloadchromium_src-0b36a3ee7f6046fd265d7ff3c41a2140fb3e9227.zip
chromium_src-0b36a3ee7f6046fd265d7ff3c41a2140fb3e9227.tar.gz
chromium_src-0b36a3ee7f6046fd265d7ff3c41a2140fb3e9227.tar.bz2
Following example of BrowserRenderProcessHost::OnMessageReceived, respond to sync messages even if router failed to route.
BUG=none TEST=remove a route in a debugger and see what happens Review URL: http://codereview.chromium.org/6574008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r--chrome/gpu/gpu_channel.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc
index 5b1e368..6df37d0 100644
--- a/chrome/gpu/gpu_channel.cc
+++ b/chrome/gpu/gpu_channel.cc
@@ -48,9 +48,17 @@ bool GpuChannel::OnMessageReceived(const IPC::Message& message) {
if (message.routing_id() == MSG_ROUTING_CONTROL)
return OnControlMessageReceived(message);
- // Fail silently if the GPU process has destroyed while the IPC message was
- // en-route.
- return router_.RouteMessage(message);
+ if (!router_.RouteMessage(message)) {
+ // Respond to sync messages even if router failed to route.
+ if (message.is_sync()) {
+ IPC::Message* reply = IPC::SyncMessage::GenerateReply(&message);
+ reply->set_reply_error();
+ Send(reply);
+ }
+ return false;
+ }
+
+ return true;
}
void GpuChannel::OnChannelError() {