summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/browser/renderer_host/render_message_filter.cc5
-rw-r--r--content/common/gpu/gpu_channel_manager.cc4
-rw-r--r--content/common/np_channel_base.cc7
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc3
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.cc3
-rw-r--r--content/renderer/render_thread_impl.cc6
6 files changed, 27 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index fdf4114f..267d1cc 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -159,6 +159,11 @@ class OpenChannelToPpapiBrokerCallback
virtual void OnChannelOpened(base::ProcessHandle broker_process_handle,
const IPC::ChannelHandle& channel_handle) {
+#if defined(OS_POSIX)
+ // Check the validity of fd for bug investigation. Remove after fixed.
+ // See for details: crbug.com/103957.
+ CHECK_NE(-1, channel_handle.socket.fd);
+#endif
filter_->Send(new ViewMsg_PpapiBrokerChannelCreated(routing_id_,
request_id_,
broker_process_handle,
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 94838fb..cacb7eb 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -95,7 +95,9 @@ void GpuChannelManager::OnEstablishChannel(int renderer_id) {
// On POSIX, pass the renderer-side FD. Also mark it as auto-close so
// that it gets closed after it has been sent.
int renderer_fd = channel->TakeRendererFileDescriptor();
- DCHECK_NE(-1, renderer_fd);
+ // Check the validity of |renderer_fd| for bug investigation. Replace with
+ // normal error handling after bug fixed. See for details: crbug.com/95732.
+ CHECK_NE(-1, renderer_fd);
channel_handle.socket = base::FileDescriptor(renderer_fd, true);
#endif
}
diff --git a/content/common/np_channel_base.cc b/content/common/np_channel_base.cc
index 7b72119..94d7834 100644
--- a/content/common/np_channel_base.cc
+++ b/content/common/np_channel_base.cc
@@ -121,6 +121,13 @@ base::WaitableEvent* NPChannelBase::GetModalDialogEvent(
bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop,
bool create_pipe_now,
base::WaitableEvent* shutdown_event) {
+#if defined(OS_POSIX)
+ // Check the validity of fd for bug investigation. Remove after fixed.
+ // See for details: crbug.com/95129, crbug.com/97285.
+ if (mode_ == IPC::Channel::MODE_CLIENT)
+ CHECK_NE(-1, channel_handle_.socket.fd);
+#endif
+
channel_.reset(new IPC::SyncChannel(
channel_handle_, mode_, this, ipc_message_loop, create_pipe_now,
shutdown_event));
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index c5f2a6b..0d16f9a 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -303,6 +303,9 @@ bool PpapiThread::SetupRendererChannel(base::ProcessHandle host_process_handle,
// This ensures this process will be notified when it is closed even if a
// connection is not established.
handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD(), true);
+ // Check the validity of fd for bug investigation. Remove after fixed.
+ // See for details: crbug.com/103957.
+ CHECK_NE(-1, handle->socket.fd);
if (handle->socket.fd == -1)
return false;
#endif
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 65645f1..ccd852d 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -527,6 +527,9 @@ class HostDispatcherWrapper
return false;
#if defined(OS_POSIX)
+ // Check the validity of fd for bug investigation. Remove after fixed.
+ // See for details: crbug.com/103957.
+ CHECK_NE(-1, channel_handle.socket.fd);
if (channel_handle.socket.fd == -1)
return false;
#endif
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 64ce001..a527751 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -804,6 +804,12 @@ GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync(
return NULL;
}
+#if defined(OS_POSIX)
+ // Check the validity of fd for bug investigation. Replace with normal error
+ // handling (see above) after bug fixed. See for details: crbug.com/95732.
+ CHECK_NE(-1, channel_handle.socket.fd);
+#endif
+
gpu_channel_->set_gpu_info(gpu_info);
content::GetContentClient()->SetGpuInfo(gpu_info);