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

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

Issue 224803002: Enable mmap and identity-based validation caching on pnacl-{llc,ld}.nexe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix token handover for main nexe Created 6 years, 8 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 | Annotate | Revision Log
« 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 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 static PP_Bool Pnacl_M25_PPB_NaCl_Private_Are3DInterfacesDisabled(void) { 3105 static PP_Bool Pnacl_M25_PPB_NaCl_Private_Are3DInterfacesDisabled(void) {
3106 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3106 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3107 return iface->Are3DInterfacesDisabled(); 3107 return iface->Are3DInterfacesDisabled();
3108 } 3108 }
3109 3109
3110 static int32_t Pnacl_M25_PPB_NaCl_Private_BrokerDuplicateHandle(PP_FileHandle so urce_handle, uint32_t process_id, PP_FileHandle* target_handle, uint32_t desired _access, uint32_t options) { 3110 static int32_t Pnacl_M25_PPB_NaCl_Private_BrokerDuplicateHandle(PP_FileHandle so urce_handle, uint32_t process_id, PP_FileHandle* target_handle, uint32_t desired _access, uint32_t options) {
3111 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3111 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3112 return iface->BrokerDuplicateHandle(source_handle, process_id, target_handle, desired_access, options); 3112 return iface->BrokerDuplicateHandle(source_handle, process_id, target_handle, desired_access, options);
3113 } 3113 }
3114 3114
3115 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_GetReadonlyPnaclFd(const char* f ilename) { 3115 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_GetReadonlyPnaclFd(const char* f ilename, PP_Bool is_executable, uint64_t* file_token_lo, uint64_t* file_token_hi ) {
3116 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3116 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3117 return iface->GetReadonlyPnaclFd(filename); 3117 return iface->GetReadonlyPnaclFd(filename, is_executable, file_token_lo, file_ token_hi);
3118 } 3118 }
3119 3119
3120 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_CreateTemporaryFile(PP_Instance instance) { 3120 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_CreateTemporaryFile(PP_Instance instance) {
3121 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3121 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3122 return iface->CreateTemporaryFile(instance); 3122 return iface->CreateTemporaryFile(instance);
3123 } 3123 }
3124 3124
3125 static int32_t Pnacl_M25_PPB_NaCl_Private_GetNumberOfProcessors(void) { 3125 static int32_t Pnacl_M25_PPB_NaCl_Private_GetNumberOfProcessors(void) {
3126 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3126 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3127 return iface->GetNumberOfProcessors(); 3127 return iface->GetNumberOfProcessors();
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after
5129 static const struct PPB_IsolatedFileSystem_Private_0_2 Pnacl_Wrappers_PPB_Isolat edFileSystem_Private_0_2 = { 5129 static const struct PPB_IsolatedFileSystem_Private_0_2 Pnacl_Wrappers_PPB_Isolat edFileSystem_Private_0_2 = {
5130 .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 5130 .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
5131 }; 5131 };
5132 5132
5133 static const struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = { 5133 static const struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = {
5134 .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, 5134 .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,
5135 .StartPpapiProxy = (PP_Bool (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Pr ivate_StartPpapiProxy, 5135 .StartPpapiProxy = (PP_Bool (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Pr ivate_StartPpapiProxy,
5136 .UrandomFD = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_UrandomFD, 5136 .UrandomFD = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_UrandomFD,
5137 .Are3DInterfacesDisabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_Ar e3DInterfacesDisabled, 5137 .Are3DInterfacesDisabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_Ar e3DInterfacesDisabled,
5138 .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, 5138 .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,
5139 .GetReadonlyPnaclFd = (PP_FileHandle (*)(const char* filename))&Pnacl_M25_PP B_NaCl_Private_GetReadonlyPnaclFd, 5139 .GetReadonlyPnaclFd = (PP_FileHandle (*)(const char* filename, PP_Bool is_ex ecutable, uint64_t* file_token_lo, uint64_t* file_token_hi))&Pnacl_M25_PPB_NaCl_ Private_GetReadonlyPnaclFd,
5140 .CreateTemporaryFile = (PP_FileHandle (*)(PP_Instance instance))&Pnacl_M25_P PB_NaCl_Private_CreateTemporaryFile, 5140 .CreateTemporaryFile = (PP_FileHandle (*)(PP_Instance instance))&Pnacl_M25_P PB_NaCl_Private_CreateTemporaryFile,
5141 .GetNumberOfProcessors = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetN umberOfProcessors, 5141 .GetNumberOfProcessors = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetN umberOfProcessors,
5142 .IsNonSFIModeEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsNonS FIModeEnabled, 5142 .IsNonSFIModeEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsNonS FIModeEnabled,
5143 .GetNexeFd = (int32_t (*)(PP_Instance instance, const char* pexe_url, uint32 _t abi_version, uint32_t opt_level, const char* headers, const char* extra_flags , PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_CompletionCallback call back))&Pnacl_M25_PPB_NaCl_Private_GetNexeFd, 5143 .GetNexeFd = (int32_t (*)(PP_Instance instance, const char* pexe_url, uint32 _t abi_version, uint32_t opt_level, const char* headers, const char* extra_flags , PP_Bool* is_hit, PP_FileHandle* nexe_handle, struct PP_CompletionCallback call back))&Pnacl_M25_PPB_NaCl_Private_GetNexeFd,
5144 .ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success ))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished, 5144 .ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success ))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished,
5145 .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, 5145 .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,
5146 .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, 5146 .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,
5147 .NexeFileDidOpen = (void (*)(PP_Instance instance, int32_t pp_error, int32_t fd, int32_t http_status, int64_t nexe_bytes_read, const char* url, int64_t time _since_open))&Pnacl_M25_PPB_NaCl_Private_NexeFileDidOpen, 5147 .NexeFileDidOpen = (void (*)(PP_Instance instance, int32_t pp_error, int32_t fd, int32_t http_status, int64_t nexe_bytes_read, const char* url, int64_t time _since_open))&Pnacl_M25_PPB_NaCl_Private_NexeFileDidOpen,
5148 .ReportLoadSuccess = (void (*)(PP_Instance instance, PP_Bool is_pnacl, const char* url, uint64_t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Pri vate_ReportLoadSuccess, 5148 .ReportLoadSuccess = (void (*)(PP_Instance instance, PP_Bool is_pnacl, const char* url, uint64_t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Pri vate_ReportLoadSuccess,
5149 .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, const char* error_message, const char* console_message))&Pnacl_M25_PPB_NaCl_Private_R eportLoadError, 5149 .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, const char* error_message, const char* console_message))&Pnacl_M25_PPB_NaCl_Private_R eportLoadError,
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
6225 6225
6226 /* Initialize the real_iface if it hasn't been. The wrapper depends on it. */ 6226 /* Initialize the real_iface if it hasn't been. The wrapper depends on it. */
6227 if (wrapper->real_iface == NULL) { 6227 if (wrapper->real_iface == NULL) {
6228 const void *iface = (*__real_PPPGetInterface)(name); 6228 const void *iface = (*__real_PPPGetInterface)(name);
6229 if (NULL == iface) return NULL; 6229 if (NULL == iface) return NULL;
6230 wrapper->real_iface = iface; 6230 wrapper->real_iface = iface;
6231 } 6231 }
6232 6232
6233 return wrapper->wrapped_iface; 6233 return wrapper->wrapped_iface;
6234 } 6234 }
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