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

Side by Side Diff: ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c

Issue 177113009: Support non-SFI mode in NaCl manifest file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 months 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 | « ppapi/native_client/src/trusted/plugin/service_runtime.cc ('k') | no next file » | 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) 2014 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 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 5
6 /* NOTE: this is auto-generated from IDL */ 6 /* NOTE: this is auto-generated from IDL */
7 #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.h" 7 #include "ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.h"
8 8
9 #include "ppapi/c/ppb.h" 9 #include "ppapi/c/ppb.h"
10 #include "ppapi/c/dev/ppb_alarms_dev.h" 10 #include "ppapi/c/dev/ppb_alarms_dev.h"
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 3084
3085 static int32_t Pnacl_M33_PPB_IsolatedFileSystem_Private_Open(PP_Instance instanc e, PP_IsolatedFileSystemType_Private type, PP_Resource* file_system, struct PP_C ompletionCallback* callback) { 3085 static int32_t Pnacl_M33_PPB_IsolatedFileSystem_Private_Open(PP_Instance instanc e, PP_IsolatedFileSystemType_Private type, PP_Resource* file_system, struct PP_C ompletionCallback* callback) {
3086 const struct PPB_IsolatedFileSystem_Private_0_2 *iface = Pnacl_WrapperInfo_PPB _IsolatedFileSystem_Private_0_2.real_iface; 3086 const struct PPB_IsolatedFileSystem_Private_0_2 *iface = Pnacl_WrapperInfo_PPB _IsolatedFileSystem_Private_0_2.real_iface;
3087 return iface->Open(instance, type, file_system, *callback); 3087 return iface->Open(instance, type, file_system, *callback);
3088 } 3088 }
3089 3089
3090 /* End wrapper methods for PPB_IsolatedFileSystem_Private_0_2 */ 3090 /* End wrapper methods for PPB_IsolatedFileSystem_Private_0_2 */
3091 3091
3092 /* Begin wrapper methods for PPB_NaCl_Private_1_0 */ 3092 /* Begin wrapper methods for PPB_NaCl_Private_1_0 */
3093 3093
3094 static void Pnacl_M25_PPB_NaCl_Private_LaunchSelLdr(PP_Instance instance, const char* alleged_url, PP_Bool uses_irt, PP_Bool uses_ppapi, PP_Bool enable_ppapi_de v, PP_Bool enable_dyncode_syscalls, PP_Bool enable_exception_handling, PP_Bool e nable_crash_throttling, void* imc_handle, struct PP_Var* error_message, struct P P_CompletionCallback* callback) { 3094 static void Pnacl_M25_PPB_NaCl_Private_LaunchSelLdr(PP_Instance instance, const char* alleged_url, PP_Bool uses_irt, PP_Bool uses_ppapi, PP_Bool uses_nonsfi_mod e, PP_Bool enable_ppapi_dev, PP_Bool enable_dyncode_syscalls, PP_Bool enable_exc eption_handling, PP_Bool enable_crash_throttling, void* imc_handle, struct PP_Va r* error_message, struct PP_CompletionCallback* callback) {
3095 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3095 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3096 iface->LaunchSelLdr(instance, alleged_url, uses_irt, uses_ppapi, enable_ppapi_ dev, enable_dyncode_syscalls, enable_exception_handling, enable_crash_throttling , imc_handle, error_message, *callback); 3096 iface->LaunchSelLdr(instance, alleged_url, uses_irt, uses_ppapi, uses_nonsfi_m ode, enable_ppapi_dev, enable_dyncode_syscalls, enable_exception_handling, enabl e_crash_throttling, imc_handle, error_message, *callback);
3097 } 3097 }
3098 3098
3099 static PP_ExternalPluginResult Pnacl_M25_PPB_NaCl_Private_StartPpapiProxy(PP_Ins tance instance) { 3099 static PP_ExternalPluginResult Pnacl_M25_PPB_NaCl_Private_StartPpapiProxy(PP_Ins tance instance) {
3100 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3100 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3101 return iface->StartPpapiProxy(instance); 3101 return iface->StartPpapiProxy(instance);
3102 } 3102 }
3103 3103
3104 static int32_t Pnacl_M25_PPB_NaCl_Private_UrandomFD(void) { 3104 static int32_t Pnacl_M25_PPB_NaCl_Private_UrandomFD(void) {
3105 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3105 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3106 return iface->UrandomFD(); 3106 return iface->UrandomFD();
(...skipping 17 matching lines...) Expand all
3124 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_CreateTemporaryFile(PP_Instance instance) { 3124 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_CreateTemporaryFile(PP_Instance instance) {
3125 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3125 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3126 return iface->CreateTemporaryFile(instance); 3126 return iface->CreateTemporaryFile(instance);
3127 } 3127 }
3128 3128
3129 static int32_t Pnacl_M25_PPB_NaCl_Private_GetNumberOfProcessors(void) { 3129 static int32_t Pnacl_M25_PPB_NaCl_Private_GetNumberOfProcessors(void) {
3130 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3130 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3131 return iface->GetNumberOfProcessors(); 3131 return iface->GetNumberOfProcessors();
3132 } 3132 }
3133 3133
3134 static PP_Bool Pnacl_M25_PPB_NaCl_Private_IsNonSFIModeEnabled(void) {
3135 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3136 return iface->IsNonSFIModeEnabled();
3137 }
3138
3134 static int32_t Pnacl_M25_PPB_NaCl_Private_GetNexeFd(PP_Instance instance, const char* pexe_url, uint32_t abi_version, uint32_t opt_level, const char* last_modif ied, const char* etag, PP_Bool has_no_store_header, const char* sandbox_isa, con st char* extra_flags, PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_Com pletionCallback* callback) { 3139 static int32_t Pnacl_M25_PPB_NaCl_Private_GetNexeFd(PP_Instance instance, const char* pexe_url, uint32_t abi_version, uint32_t opt_level, const char* last_modif ied, const char* etag, PP_Bool has_no_store_header, const char* sandbox_isa, con st char* extra_flags, PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_Com pletionCallback* callback) {
3135 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3140 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3136 return iface->GetNexeFd(instance, pexe_url, abi_version, opt_level, last_modif ied, etag, has_no_store_header, sandbox_isa, extra_flags, is_hit, nexe_handle, * callback); 3141 return iface->GetNexeFd(instance, pexe_url, abi_version, opt_level, last_modif ied, etag, has_no_store_header, sandbox_isa, extra_flags, is_hit, nexe_handle, * callback);
3137 } 3142 }
3138 3143
3139 static void Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished(PP_Instance ins tance, PP_Bool success) { 3144 static void Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished(PP_Instance ins tance, PP_Bool success) {
3140 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3145 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3141 iface->ReportTranslationFinished(instance, success); 3146 iface->ReportTranslationFinished(instance, success);
3142 } 3147 }
3143 3148
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
5035 .GetWindowObject = (struct PP_Var (*)(PP_Instance instance))&Pnacl_M13_PPB_I nstance_Private_GetWindowObject, 5040 .GetWindowObject = (struct PP_Var (*)(PP_Instance instance))&Pnacl_M13_PPB_I nstance_Private_GetWindowObject,
5036 .GetOwnerElementObject = (struct PP_Var (*)(PP_Instance instance))&Pnacl_M13 _PPB_Instance_Private_GetOwnerElementObject, 5041 .GetOwnerElementObject = (struct PP_Var (*)(PP_Instance instance))&Pnacl_M13 _PPB_Instance_Private_GetOwnerElementObject,
5037 .ExecuteScript = (struct PP_Var (*)(PP_Instance instance, struct PP_Var scri pt, struct PP_Var* exception))&Pnacl_M13_PPB_Instance_Private_ExecuteScript 5042 .ExecuteScript = (struct PP_Var (*)(PP_Instance instance, struct PP_Var scri pt, struct PP_Var* exception))&Pnacl_M13_PPB_Instance_Private_ExecuteScript
5038 }; 5043 };
5039 5044
5040 static const struct PPB_IsolatedFileSystem_Private_0_2 Pnacl_Wrappers_PPB_Isolat edFileSystem_Private_0_2 = { 5045 static const struct PPB_IsolatedFileSystem_Private_0_2 Pnacl_Wrappers_PPB_Isolat edFileSystem_Private_0_2 = {
5041 .Open = (int32_t (*)(PP_Instance instance, PP_IsolatedFileSystemType_Private type, PP_Resource* file_system, struct PP_CompletionCallback callback))&Pnacl_M 33_PPB_IsolatedFileSystem_Private_Open 5046 .Open = (int32_t (*)(PP_Instance instance, PP_IsolatedFileSystemType_Private type, PP_Resource* file_system, struct PP_CompletionCallback callback))&Pnacl_M 33_PPB_IsolatedFileSystem_Private_Open
5042 }; 5047 };
5043 5048
5044 static const struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = { 5049 static const struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = {
5045 .LaunchSelLdr = (void (*)(PP_Instance instance, const char* alleged_url, PP_ Bool uses_irt, PP_Bool uses_ppapi, PP_Bool enable_ppapi_dev, PP_Bool enable_dync ode_syscalls, PP_Bool enable_exception_handling, PP_Bool enable_crash_throttling , void* imc_handle, struct PP_Var* error_message, struct PP_CompletionCallback c allback))&Pnacl_M25_PPB_NaCl_Private_LaunchSelLdr, 5050 .LaunchSelLdr = (void (*)(PP_Instance instance, const char* alleged_url, PP_ Bool uses_irt, PP_Bool uses_ppapi, PP_Bool uses_nonsfi_mode, PP_Bool enable_ppap i_dev, PP_Bool enable_dyncode_syscalls, PP_Bool enable_exception_handling, PP_Bo ol enable_crash_throttling, void* imc_handle, struct PP_Var* error_message, stru ct PP_CompletionCallback callback))&Pnacl_M25_PPB_NaCl_Private_LaunchSelLdr,
5046 .StartPpapiProxy = (PP_ExternalPluginResult (*)(PP_Instance instance))&Pnacl _M25_PPB_NaCl_Private_StartPpapiProxy, 5051 .StartPpapiProxy = (PP_ExternalPluginResult (*)(PP_Instance instance))&Pnacl _M25_PPB_NaCl_Private_StartPpapiProxy,
5047 .UrandomFD = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_UrandomFD, 5052 .UrandomFD = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_UrandomFD,
5048 .Are3DInterfacesDisabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_Ar e3DInterfacesDisabled, 5053 .Are3DInterfacesDisabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_Ar e3DInterfacesDisabled,
5049 .BrokerDuplicateHandle = (int32_t (*)(PP_FileHandle source_handle, uint32_t process_id, PP_FileHandle* target_handle, uint32_t desired_access, uint32_t opti ons))&Pnacl_M25_PPB_NaCl_Private_BrokerDuplicateHandle, 5054 .BrokerDuplicateHandle = (int32_t (*)(PP_FileHandle source_handle, uint32_t process_id, PP_FileHandle* target_handle, uint32_t desired_access, uint32_t opti ons))&Pnacl_M25_PPB_NaCl_Private_BrokerDuplicateHandle,
5050 .GetReadonlyPnaclFd = (PP_FileHandle (*)(const char* filename))&Pnacl_M25_PP B_NaCl_Private_GetReadonlyPnaclFd, 5055 .GetReadonlyPnaclFd = (PP_FileHandle (*)(const char* filename))&Pnacl_M25_PP B_NaCl_Private_GetReadonlyPnaclFd,
5051 .CreateTemporaryFile = (PP_FileHandle (*)(PP_Instance instance))&Pnacl_M25_P PB_NaCl_Private_CreateTemporaryFile, 5056 .CreateTemporaryFile = (PP_FileHandle (*)(PP_Instance instance))&Pnacl_M25_P PB_NaCl_Private_CreateTemporaryFile,
5052 .GetNumberOfProcessors = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetN umberOfProcessors, 5057 .GetNumberOfProcessors = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetN umberOfProcessors,
5058 .IsNonSFIModeEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsNonS FIModeEnabled,
5053 .GetNexeFd = (int32_t (*)(PP_Instance instance, const char* pexe_url, uint32 _t abi_version, uint32_t opt_level, const char* last_modified, const char* etag, PP_Bool has_no_store_header, const char* sandbox_isa, const char* extra_flags, PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_CompletionCallback callba ck))&Pnacl_M25_PPB_NaCl_Private_GetNexeFd, 5059 .GetNexeFd = (int32_t (*)(PP_Instance instance, const char* pexe_url, uint32 _t abi_version, uint32_t opt_level, const char* last_modified, const char* etag, PP_Bool has_no_store_header, const char* sandbox_isa, const char* extra_flags, PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_CompletionCallback callba ck))&Pnacl_M25_PPB_NaCl_Private_GetNexeFd,
5054 .ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success ))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished, 5060 .ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success ))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished,
5055 .OpenNaClExecutable = (PP_FileHandle (*)(PP_Instance instance, const char* f ile_url, uint64_t* file_token_lo, uint64_t* file_token_hi))&Pnacl_M25_PPB_NaCl_P rivate_OpenNaClExecutable, 5061 .OpenNaClExecutable = (PP_FileHandle (*)(PP_Instance instance, const char* f ile_url, uint64_t* file_token_lo, uint64_t* file_token_hi))&Pnacl_M25_PPB_NaCl_P rivate_OpenNaClExecutable,
5056 .DispatchEvent = (void (*)(PP_Instance instance, PP_NaClEventType event_type , const char* resource_url, PP_Bool length_is_computable, uint64_t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Private_DispatchEvent, 5062 .DispatchEvent = (void (*)(PP_Instance instance, PP_NaClEventType event_type , const char* resource_url, PP_Bool length_is_computable, uint64_t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Private_DispatchEvent,
5057 .SetReadOnlyProperty = (void (*)(PP_Instance instance, struct PP_Var key, st ruct PP_Var value))&Pnacl_M25_PPB_NaCl_Private_SetReadOnlyProperty, 5063 .SetReadOnlyProperty = (void (*)(PP_Instance instance, struct PP_Var key, st ruct PP_Var value))&Pnacl_M25_PPB_NaCl_Private_SetReadOnlyProperty,
5058 .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, PP_Bo ol is_installed))&Pnacl_M25_PPB_NaCl_Private_ReportLoadError, 5064 .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, PP_Bo ol is_installed))&Pnacl_M25_PPB_NaCl_Private_ReportLoadError,
5059 .InstanceDestroyed = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Pri vate_InstanceDestroyed, 5065 .InstanceDestroyed = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Pri vate_InstanceDestroyed,
5060 .NaClDebugStubEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_NaClD ebugStubEnabled 5066 .NaClDebugStubEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_NaClD ebugStubEnabled
5061 }; 5067 };
5062 5068
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
6115 6121
6116 /* Initialize the real_iface if it hasn't been. The wrapper depends on it. */ 6122 /* Initialize the real_iface if it hasn't been. The wrapper depends on it. */
6117 if (wrapper->real_iface == NULL) { 6123 if (wrapper->real_iface == NULL) {
6118 const void *iface = (*__real_PPPGetInterface)(name); 6124 const void *iface = (*__real_PPPGetInterface)(name);
6119 if (NULL == iface) return NULL; 6125 if (NULL == iface) return NULL;
6120 wrapper->real_iface = iface; 6126 wrapper->real_iface = iface;
6121 } 6127 }
6122 6128
6123 return wrapper->wrapped_iface; 6129 return wrapper->wrapped_iface;
6124 } 6130 }
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/service_runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698