OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h" | 7 #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.h" |
8 | 8 |
9 #include <string.h> | 9 #include <string.h> |
10 #include "native_client/src/include/nacl_macros.h" | 10 #include "native_client/src/include/nacl_macros.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 static int is_irt_interface_whitelisted(const char *interface_name) { | 83 static int is_irt_interface_whitelisted(const char *interface_name) { |
84 int i; | 84 int i; |
85 for (i = 0; i < NACL_ARRAY_SIZE(irt_interface_whitelist); i++) { | 85 for (i = 0; i < NACL_ARRAY_SIZE(irt_interface_whitelist); i++) { |
86 if (mystrcmp(interface_name, irt_interface_whitelist[i]) == 0) { | 86 if (mystrcmp(interface_name, irt_interface_whitelist[i]) == 0) { |
87 return 1; | 87 return 1; |
88 } | 88 } |
89 } | 89 } |
90 return 0; | 90 return 0; |
91 } | 91 } |
92 | 92 |
93 TYPE_nacl_irt_query __pnacl_real_irt_interface; | 93 TYPE_nacl_irt_query __pnacl_real_irt_interface = NULL; |
94 | 94 |
95 /* | 95 /* |
96 * These remember the interface pointers the user registers by calling the | 96 * These remember the interface pointers the user registers by calling the |
97 * IRT entry point. | 97 * IRT entry point. |
98 */ | 98 */ |
99 static struct PP_StartFunctions user_start_functions; | 99 static struct PP_StartFunctions user_start_functions; |
100 | 100 |
101 static int32_t wrap_PPPInitializeModule(PP_Module module_id, | 101 static int32_t wrap_PPPInitializeModule(PP_Module module_id, |
102 PPB_GetInterface get_browser_intf) { | 102 PPB_GetInterface get_browser_intf) { |
103 __set_real_Pnacl_PPBGetInterface(get_browser_intf); | 103 __set_real_Pnacl_PPBGetInterface(get_browser_intf); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 */ | 167 */ |
168 struct nacl_irt_ppapihook *dest = table; | 168 struct nacl_irt_ppapihook *dest = table; |
169 if (sizeof *dest <= tablesize) { | 169 if (sizeof *dest <= tablesize) { |
170 dest->ppapi_start = wrap_ppapi_start; | 170 dest->ppapi_start = wrap_ppapi_start; |
171 dest->ppapi_register_thread_creator = | 171 dest->ppapi_register_thread_creator = |
172 real_irt_ppapi_hook.ppapi_register_thread_creator; | 172 real_irt_ppapi_hook.ppapi_register_thread_creator; |
173 return sizeof *dest; | 173 return sizeof *dest; |
174 } | 174 } |
175 return 0; | 175 return 0; |
176 } | 176 } |
OLD | NEW |