OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "native_client/src/public/chrome_main.h" | 6 #include "native_client/src/public/chrome_main.h" |
7 #include "native_client/src/public/irt_core.h" | 7 #include "native_client/src/public/irt_core.h" |
8 #include "ppapi/nacl_irt/irt_ppapi.h" | 8 #include "ppapi/nacl_irt/irt_ppapi.h" |
9 #include "ppapi/nacl_irt/plugin_startup.h" | 9 #include "ppapi/nacl_irt/plugin_startup.h" |
10 | 10 |
11 void nacl_irt_start(uint32_t* info) { | 11 void nacl_irt_start(uint32_t* info) { |
12 nacl_irt_init(info); | 12 nacl_irt_init(info); |
13 | 13 |
14 // Though it isn't referenced here, we must instantiate an AtExitManager. | 14 // Though it isn't referenced here, we must instantiate an AtExitManager. |
15 base::AtExitManager exit_manager; | 15 base::AtExitManager exit_manager; |
16 | 16 |
17 // In SFI mode, the FDs of IPC channels are NACL_CHROME_DESC_BASE and its | 17 // In SFI mode, the FDs of IPC channels are NACL_CHROME_DESC_BASE and its |
18 // successor, which is set in nacl_listener.cc. | 18 // successor, which is set in nacl_listener.cc. |
19 ppapi::SetIPCFileDescriptors( | 19 ppapi::SetIPCFileDescriptors( |
20 NACL_CHROME_DESC_BASE, NACL_CHROME_DESC_BASE + 1); | 20 NACL_CHROME_DESC_BASE, |
| 21 NACL_CHROME_DESC_BASE + 1, |
| 22 -1); // Currently EmbedderService is disabled on NaCl in SFI mode. |
21 ppapi::StartUpPlugin(); | 23 ppapi::StartUpPlugin(); |
22 | 24 |
23 nacl_irt_enter_user_code(info, chrome_irt_query); | 25 nacl_irt_enter_user_code(info, chrome_irt_query); |
24 } | 26 } |
OLD | NEW |