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

Side by Side Diff: content/common/gpu/gpu_channel_manager.cc

Issue 9307009: Remove CHECKs used for bug investigation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Keep DCHECK to prevent regression. Created 8 years, 10 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/common/child_thread.h" 8 #include "content/common/child_thread.h"
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/gpu_messages.h" 10 #include "content/common/gpu/gpu_messages.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 client_id, 86 client_id,
87 false); 87 false);
88 if (channel->Init(io_message_loop_, shutdown_event_)) { 88 if (channel->Init(io_message_loop_, shutdown_event_)) {
89 gpu_channels_[client_id] = channel; 89 gpu_channels_[client_id] = channel;
90 channel_handle.name = channel->GetChannelName(); 90 channel_handle.name = channel->GetChannelName();
91 91
92 #if defined(OS_POSIX) 92 #if defined(OS_POSIX)
93 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so 93 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so
94 // that it gets closed after it has been sent. 94 // that it gets closed after it has been sent.
95 int renderer_fd = channel->TakeRendererFileDescriptor(); 95 int renderer_fd = channel->TakeRendererFileDescriptor();
96 // Check the validity of |renderer_fd| for bug investigation. Replace with 96 DCHECK_NE(-1, renderer_fd);
97 // normal error handling after bug fixed. See for details: crbug.com/95732.
98 CHECK_NE(-1, renderer_fd);
99 channel_handle.socket = base::FileDescriptor(renderer_fd, true); 97 channel_handle.socket = base::FileDescriptor(renderer_fd, true);
100 #endif 98 #endif
101 } 99 }
102 100
103 Send(new GpuHostMsg_ChannelEstablished(channel_handle)); 101 Send(new GpuHostMsg_ChannelEstablished(channel_handle));
104 } 102 }
105 103
106 void GpuChannelManager::OnCloseChannel( 104 void GpuChannelManager::OnCloseChannel(
107 const IPC::ChannelHandle& channel_handle) { 105 const IPC::ChannelHandle& channel_handle) {
108 for (GpuChannelMap::iterator iter = gpu_channels_.begin(); 106 for (GpuChannelMap::iterator iter = gpu_channels_.begin();
(...skipping 25 matching lines...) Expand all
134 void GpuChannelManager::LoseAllContexts() { 132 void GpuChannelManager::LoseAllContexts() {
135 MessageLoop::current()->PostTask( 133 MessageLoop::current()->PostTask(
136 FROM_HERE, 134 FROM_HERE,
137 base::Bind(&GpuChannelManager::OnLoseAllContexts, 135 base::Bind(&GpuChannelManager::OnLoseAllContexts,
138 weak_factory_.GetWeakPtr())); 136 weak_factory_.GetWeakPtr()));
139 } 137 }
140 138
141 void GpuChannelManager::OnLoseAllContexts() { 139 void GpuChannelManager::OnLoseAllContexts() {
142 gpu_channels_.clear(); 140 gpu_channels_.clear();
143 } 141 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698