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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.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/common/np_channel_base.cc ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | 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/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 delete dispatcher; 296 delete dispatcher;
297 return false; 297 return false;
298 } 298 }
299 299
300 handle->name = plugin_handle.name; 300 handle->name = plugin_handle.name;
301 #if defined(OS_POSIX) 301 #if defined(OS_POSIX)
302 // On POSIX, transfer ownership of the renderer-side (client) FD. 302 // On POSIX, transfer ownership of the renderer-side (client) FD.
303 // This ensures this process will be notified when it is closed even if a 303 // This ensures this process will be notified when it is closed even if a
304 // connection is not established. 304 // connection is not established.
305 handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD(), true); 305 handle->socket = base::FileDescriptor(dispatcher->TakeRendererFD(), true);
306 // Check the validity of fd for bug investigation. Remove after fixed.
307 // See for details: crbug.com/103957.
308 CHECK_NE(-1, handle->socket.fd);
306 if (handle->socket.fd == -1) 309 if (handle->socket.fd == -1)
307 return false; 310 return false;
308 #endif 311 #endif
309 312
310 // From here, the dispatcher will manage its own lifetime according to the 313 // From here, the dispatcher will manage its own lifetime according to the
311 // lifetime of the attached channel. 314 // lifetime of the attached channel.
312 return true; 315 return true;
313 } 316 }
OLDNEW
« no previous file with comments | « content/common/np_channel_base.cc ('k') | content/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698