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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 8735015: Add CHECK on file descriptor in various IPC::ChannelHandle passed in. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove CHECK in plugin thread. Created 9 years 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
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 &channel_handle, 791 &channel_handle,
792 &renderer_process_for_gpu, 792 &renderer_process_for_gpu,
793 &gpu_info)) || 793 &gpu_info)) ||
794 channel_handle.name.empty() || 794 channel_handle.name.empty() ||
795 renderer_process_for_gpu == base::kNullProcessHandle) { 795 renderer_process_for_gpu == base::kNullProcessHandle) {
796 // Otherwise cancel the connection. 796 // Otherwise cancel the connection.
797 gpu_channel_ = NULL; 797 gpu_channel_ = NULL;
798 return NULL; 798 return NULL;
799 } 799 }
800 800
801 #if defined(OS_POSIX)
802 // Check the validity of fd for bug investigation. Replace with normal error
803 // handling (see above) after bug fixed. See for details: crbug.com/95732.
804 CHECK_NE(-1, channel_handle.socket.fd);
805 #endif
806
801 gpu_channel_->set_gpu_info(gpu_info); 807 gpu_channel_->set_gpu_info(gpu_info);
802 content::GetContentClient()->SetGpuInfo(gpu_info); 808 content::GetContentClient()->SetGpuInfo(gpu_info);
803 809
804 // Connect to the GPU process if a channel name was received. 810 // Connect to the GPU process if a channel name was received.
805 gpu_channel_->Connect(channel_handle, renderer_process_for_gpu); 811 gpu_channel_->Connect(channel_handle, renderer_process_for_gpu);
806 812
807 return GetGpuChannel(); 813 return GetGpuChannel();
808 } 814 }
809 815
810 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 816 GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
(...skipping 29 matching lines...) Expand all
840 846
841 scoped_refptr<base::MessageLoopProxy> 847 scoped_refptr<base::MessageLoopProxy>
842 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 848 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
843 DCHECK(message_loop() == MessageLoop::current()); 849 DCHECK(message_loop() == MessageLoop::current());
844 if (!file_thread_.get()) { 850 if (!file_thread_.get()) {
845 file_thread_.reset(new base::Thread("Renderer::FILE")); 851 file_thread_.reset(new base::Thread("Renderer::FILE"));
846 file_thread_->Start(); 852 file_thread_->Start();
847 } 853 }
848 return file_thread_->message_loop_proxy(); 854 return file_thread_->message_loop_proxy();
849 } 855 }
OLDNEW
« no previous file with comments | « content/renderer/pepper_plugin_delegate_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698