diff options
-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) { |