OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Native Client Authors. All rights reserved. | 2 * Copyright 2010 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can | 3 * Use of this source code is governed by a BSD-style license that can |
4 * be found in the LICENSE file. | 4 * be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include "native_client/src/trusted/plugin/srpc/nexe_arch.h" | 7 #include "native_client/src/trusted/plugin/nexe_arch.h" |
8 | 8 |
9 #include <stdio.h> | 9 #include <stdio.h> |
10 | 10 |
11 #include "native_client/src/include/portability.h" | 11 #include "native_client/src/include/portability.h" |
12 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" | 12 #include "native_client/src/trusted/platform_qualify/nacl_os_qualify.h" |
13 #include "native_client/src/trusted/plugin/srpc/utility.h" | 13 #include "native_client/src/trusted/plugin/utility.h" |
14 | 14 |
15 namespace plugin { | 15 namespace plugin { |
16 | 16 |
17 // Returns the kind of SFI sandbox implemented by sel_ldr on this | 17 // Returns the kind of SFI sandbox implemented by sel_ldr on this |
18 // platform: ARM, x86-32, x86-64. | 18 // platform: ARM, x86-32, x86-64. |
19 // | 19 // |
20 // This is a function of the current CPU, OS, browser, installed | 20 // This is a function of the current CPU, OS, browser, installed |
21 // sel_ldr(s). It is not sufficient to derive the result only from | 21 // sel_ldr(s). It is not sufficient to derive the result only from |
22 // build-time parameters since, for example, an x86-32 plugin is | 22 // build-time parameters since, for example, an x86-32 plugin is |
23 // capable of launching a 64-bit NaCl sandbox if a 64-bit sel_ldr is | 23 // capable of launching a 64-bit NaCl sandbox if a 64-bit sel_ldr is |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 const nacl::string sandbox = GetSandbox(); | 114 const nacl::string sandbox = GetSandbox(); |
115 PLUGIN_PRINTF(("GetNexeURL(): sandbox='%s' nexes='%s'.\n", | 115 PLUGIN_PRINTF(("GetNexeURL(): sandbox='%s' nexes='%s'.\n", |
116 sandbox.c_str(), nexes_attr)); | 116 sandbox.c_str(), nexes_attr)); |
117 if (FindNexeForSandbox(nexes_attr, sandbox, result)) return true; | 117 if (FindNexeForSandbox(nexes_attr, sandbox, result)) return true; |
118 *result = "No Native Client executable was provided for the " + sandbox | 118 *result = "No Native Client executable was provided for the " + sandbox |
119 + " sandbox."; | 119 + " sandbox."; |
120 return false; | 120 return false; |
121 } | 121 } |
122 | 122 |
123 } // namespace plugin | 123 } // namespace plugin |
OLD | NEW |