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

Unified Diff: content/common/np_channel_base.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/np_channel_base.cc
diff --git a/content/common/np_channel_base.cc b/content/common/np_channel_base.cc
index 7b721193479d70e96072e4b16f205f4719a05d7c..94d78340f7c09e7ea5cb13a0b36ce1ead171e349 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));
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698