OLD | NEW |
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 if (!init_result) { | 293 if (!init_result) { |
294 delete dispatcher; | 294 delete dispatcher; |
295 return false; | 295 return false; |
296 } | 296 } |
297 | 297 |
298 handle->name = plugin_handle.name; | 298 handle->name = plugin_handle.name; |
299 #if defined(OS_POSIX) | 299 #if defined(OS_POSIX) |
300 // On POSIX, pass the renderer-side FD. | 300 // On POSIX, pass the renderer-side FD. |
301 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), | 301 handle->socket = base::FileDescriptor(::dup(dispatcher->GetRendererFD()), |
302 true); | 302 true); |
| 303 if (handle->socket.fd == -1) |
| 304 return false; |
303 #endif | 305 #endif |
304 | 306 |
305 // From here, the dispatcher will manage its own lifetime according to the | 307 // From here, the dispatcher will manage its own lifetime according to the |
306 // lifetime of the attached channel. | 308 // lifetime of the attached channel. |
307 return true; | 309 return true; |
308 } | 310 } |
OLD | NEW |