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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 8436008: Add check on invalid file descriptor at both broker and renderer sides. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced and resolved conflict. 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/content_tests.gypi ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index c35bbd79eb5aedb57048b62d58ed7f060ef91662..c2dc8c25f4fd5c6212d623528850d31de185f70a 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -301,6 +301,8 @@ 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);
+ if (handle->socket.fd == -1)
+ return false;
#endif
// From here, the dispatcher will manage its own lifetime according to the
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698