diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 19:58:00 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-16 19:58:00 +0000 |
commit | 80f3d9661c68abd5b445f5c112935616fb472052 (patch) | |
tree | 92ca0aa3b959a4a1c0cab12e84bd876b1519cd9e /chrome | |
parent | eac1cd26a7fec8261bbe60f2aed21e01368e4af6 (diff) | |
download | chromium_src-80f3d9661c68abd5b445f5c112935616fb472052.zip chromium_src-80f3d9661c68abd5b445f5c112935616fb472052.tar.gz chromium_src-80f3d9661c68abd5b445f5c112935616fb472052.tar.bz2 |
GpuProcessHost and GpuChannel do not assert if they receive an IPC message that cannot be routed.
Comment added to code:
The object to which the message is addressed might have been destroyed. This is expected, for example an asynchronous SwapBuffers notification to a command buffer proxy that has since been destroyed. This function fails silently in that case.
TEST=try
BUG=none
Review URL: http://codereview.chromium.org/3362017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59702 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/gpu/gpu_channel.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/gpu_channel_host.cc | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/chrome/gpu/gpu_channel.cc b/chrome/gpu/gpu_channel.cc index 56ba079..1abd62c6 100644 --- a/chrome/gpu/gpu_channel.cc +++ b/chrome/gpu/gpu_channel.cc @@ -57,9 +57,9 @@ void GpuChannel::OnMessageReceived(const IPC::Message& message) { if (message.routing_id() == MSG_ROUTING_CONTROL) { OnControlMessageReceived(message); } else { - // The sender should know not to route messages to an object after it - // has been destroyed. - CHECK(router_.RouteMessage(message)); + // Fail silently if the GPU process has destroyed while the IPC message was + // en-route. + router_.RouteMessage(message); } } diff --git a/chrome/renderer/gpu_channel_host.cc b/chrome/renderer/gpu_channel_host.cc index b4e5bd1..141ae6f 100644 --- a/chrome/renderer/gpu_channel_host.cc +++ b/chrome/renderer/gpu_channel_host.cc @@ -38,9 +38,12 @@ const GPUInfo& GpuChannelHost::gpu_info() const { void GpuChannelHost::OnMessageReceived(const IPC::Message& message) { DCHECK(message.routing_id() != MSG_ROUTING_CONTROL); - if (!router_.RouteMessage(message)) { - NOTREACHED() << "GpuChannelHost failed to route message"; - } + + // The object to which the message is addressed might have been destroyed. + // This is expected, for example an asynchronous SwapBuffers notification + // to a command buffer proxy that has since been destroyed. This function + // fails silently in that case. + router_.RouteMessage(message); } void GpuChannelHost::OnChannelConnected(int32 peer_pid) { |