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

Unified Diff: content/common/np_channel_base.cc

Issue 8877001: Add more CHECK in GPU and NPAPI process on invalid file descriptors (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: NOTREACHED changed to CHECK(false). Thanks piman! 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 side-by-side diff with in-line comments
Download patch
Index: content/common/np_channel_base.cc
diff --git a/content/common/np_channel_base.cc b/content/common/np_channel_base.cc
index 94d78340f7c09e7ea5cb13a0b36ce1ead171e349..d83029534b03d5a04d405ee14af0aa4aab32534e 100644
--- a/content/common/np_channel_base.cc
+++ b/content/common/np_channel_base.cc
@@ -131,6 +131,14 @@ bool NPChannelBase::Init(base::MessageLoopProxy* ipc_message_loop,
channel_.reset(new IPC::SyncChannel(
channel_handle_, mode_, this, ipc_message_loop, create_pipe_now,
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_SERVER)
ddorwin 2011/12/08 19:17:27 Do we have a separate check that covers the client
xhwang 2011/12/08 19:37:49 This same function is shared by both server and cl
+ CHECK_NE(-1, channel_->GetClientFileDescriptor());
+#endif
+
channel_valid_ = true;
return true;
}
« content/common/gpu/gpu_channel_manager.cc ('K') | « content/common/gpu/gpu_channel_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698