Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: chrome/gpu/gpu_channel.cc

Issue 4979005: Gpu: Unregister channel name in the gpu process when a channel closes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/gpu/gpu_channel.h" 5 #include "chrome/gpu/gpu_channel.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 OnControlMessageReceived(message); 58 OnControlMessageReceived(message);
59 } else { 59 } else {
60 // Fail silently if the GPU process has destroyed while the IPC message was 60 // Fail silently if the GPU process has destroyed while the IPC message was
61 // en-route. 61 // en-route.
62 router_.RouteMessage(message); 62 router_.RouteMessage(message);
63 } 63 }
64 } 64 }
65 65
66 void GpuChannel::OnChannelError() { 66 void GpuChannel::OnChannelError() {
67 static_cast<GpuThread*>(ChildThread::current())->RemoveChannel(renderer_id_); 67 static_cast<GpuThread*>(ChildThread::current())->RemoveChannel(renderer_id_);
68 #if defined(OS_POSIX)
69 IPC::RemoveAndCloseChannelSocket(GetChannelName());
apatrick 2010/11/16 17:48:55 I think this is the right thing to do but I wonder
70 #endif
68 } 71 }
69 72
70 bool GpuChannel::Send(IPC::Message* message) { 73 bool GpuChannel::Send(IPC::Message* message) {
71 if (log_messages_) { 74 if (log_messages_) {
72 VLOG(1) << "sending message @" << message << " on channel @" << this 75 VLOG(1) << "sending message @" << message << " on channel @" << this
73 << " with type " << message->type(); 76 << " with type " << message->type();
74 } 77 }
75 78
76 if (!channel_.get()) { 79 if (!channel_.get()) {
77 delete message; 80 delete message;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 channel_name, IPC::Channel::MODE_SERVER, this, NULL, 245 channel_name, IPC::Channel::MODE_SERVER, this, NULL,
243 ChildProcess::current()->io_message_loop(), false, 246 ChildProcess::current()->io_message_loop(), false,
244 ChildProcess::current()->GetShutDownEvent())); 247 ChildProcess::current()->GetShutDownEvent()));
245 248
246 return true; 249 return true;
247 } 250 }
248 251
249 std::string GpuChannel::GetChannelName() { 252 std::string GpuChannel::GetChannelName() {
250 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_); 253 return StringPrintf("%d.r%d", base::GetCurrentProcId(), renderer_id_);
251 } 254 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698