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

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

Issue 231243002: PPAPI: Move some of NexeFileDidOpen to NexeLoadManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash 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/plugin.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 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after
3145 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_OpenNaClExecutable(PP_Instance i nstance, const char* file_url, uint64_t* file_token_lo, uint64_t* file_token_hi) { 3145 static PP_FileHandle Pnacl_M25_PPB_NaCl_Private_OpenNaClExecutable(PP_Instance i nstance, const char* file_url, uint64_t* file_token_lo, uint64_t* file_token_hi) {
3146 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3146 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3147 return iface->OpenNaClExecutable(instance, file_url, file_token_lo, file_token _hi); 3147 return iface->OpenNaClExecutable(instance, file_url, file_token_lo, file_token _hi);
3148 } 3148 }
3149 3149
3150 static void Pnacl_M25_PPB_NaCl_Private_DispatchEvent(PP_Instance instance, PP_Na ClEventType event_type, const char* resource_url, PP_Bool length_is_computable, uint64_t loaded_bytes, uint64_t total_bytes) { 3150 static void Pnacl_M25_PPB_NaCl_Private_DispatchEvent(PP_Instance instance, PP_Na ClEventType event_type, const char* resource_url, PP_Bool length_is_computable, uint64_t loaded_bytes, uint64_t total_bytes) {
3151 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3151 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3152 iface->DispatchEvent(instance, event_type, resource_url, length_is_computable, loaded_bytes, total_bytes); 3152 iface->DispatchEvent(instance, event_type, resource_url, length_is_computable, loaded_bytes, total_bytes);
3153 } 3153 }
3154 3154
3155 static void Pnacl_M25_PPB_NaCl_Private_NexeFileDidOpen(PP_Instance instance, int 32_t pp_error, int32_t fd, int32_t http_status, int64_t nexe_bytes_read, const c har* url) {
3156 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3157 iface->NexeFileDidOpen(instance, pp_error, fd, http_status, nexe_bytes_read, u rl);
3158 }
3159
3155 static void Pnacl_M25_PPB_NaCl_Private_ReportLoadSuccess(PP_Instance instance, c onst char* url, uint64_t loaded_bytes, uint64_t total_bytes) { 3160 static void Pnacl_M25_PPB_NaCl_Private_ReportLoadSuccess(PP_Instance instance, c onst char* url, uint64_t loaded_bytes, uint64_t total_bytes) {
3156 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3161 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3157 iface->ReportLoadSuccess(instance, url, loaded_bytes, total_bytes); 3162 iface->ReportLoadSuccess(instance, url, loaded_bytes, total_bytes);
3158 } 3163 }
3159 3164
3160 static void Pnacl_M25_PPB_NaCl_Private_ReportLoadError(PP_Instance instance, PP_ NaClError error, const char* error_message, const char* console_message) { 3165 static void Pnacl_M25_PPB_NaCl_Private_ReportLoadError(PP_Instance instance, PP_ NaClError error, const char* error_message, const char* console_message) {
3161 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface; 3166 const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_ 1_0.real_iface;
3162 iface->ReportLoadError(instance, error, error_message, console_message); 3167 iface->ReportLoadError(instance, error, error_message, console_message);
3163 } 3168 }
3164 3169
(...skipping 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
5137 .Are3DInterfacesDisabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_Ar e3DInterfacesDisabled, 5142 .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, 5143 .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, 5144 .GetReadonlyPnaclFd = (PP_FileHandle (*)(const char* filename))&Pnacl_M25_PP B_NaCl_Private_GetReadonlyPnaclFd,
5140 .CreateTemporaryFile = (PP_FileHandle (*)(PP_Instance instance))&Pnacl_M25_P PB_NaCl_Private_CreateTemporaryFile, 5145 .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, 5146 .GetNumberOfProcessors = (int32_t (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetN umberOfProcessors,
5142 .IsNonSFIModeEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_IsNonS FIModeEnabled, 5147 .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* 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, 5148 .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,
5144 .ReportTranslationFinished = (void (*)(PP_Instance instance, PP_Bool success ))&Pnacl_M25_PPB_NaCl_Private_ReportTranslationFinished, 5149 .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, 5150 .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, 5151 .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,
5152 .NexeFileDidOpen = (void (*)(PP_Instance instance, int32_t pp_error, int32_t fd, int32_t http_status, int64_t nexe_bytes_read, const char* url))&Pnacl_M25_P PB_NaCl_Private_NexeFileDidOpen,
5147 .ReportLoadSuccess = (void (*)(PP_Instance instance, const char* url, uint64 _t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Private_ReportLoadSuc cess, 5153 .ReportLoadSuccess = (void (*)(PP_Instance instance, const char* url, uint64 _t loaded_bytes, uint64_t total_bytes))&Pnacl_M25_PPB_NaCl_Private_ReportLoadSuc cess,
5148 .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, const char* error_message, const char* console_message))&Pnacl_M25_PPB_NaCl_Private_R eportLoadError, 5154 .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, const char* error_message, const char* console_message))&Pnacl_M25_PPB_NaCl_Private_R eportLoadError,
5149 .ReportLoadAbort = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Priva te_ReportLoadAbort, 5155 .ReportLoadAbort = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Priva te_ReportLoadAbort,
5150 .NexeDidCrash = (void (*)(PP_Instance instance, const char* crash_log))&Pnac l_M25_PPB_NaCl_Private_NexeDidCrash, 5156 .NexeDidCrash = (void (*)(PP_Instance instance, const char* crash_log))&Pnac l_M25_PPB_NaCl_Private_NexeDidCrash,
5151 .InstanceCreated = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Priva te_InstanceCreated, 5157 .InstanceCreated = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Priva te_InstanceCreated,
5152 .InstanceDestroyed = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Pri vate_InstanceDestroyed, 5158 .InstanceDestroyed = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Pri vate_InstanceDestroyed,
5153 .NaClDebugEnabledForURL = (PP_Bool (*)(const char* alleged_nmf_url))&Pnacl_M 25_PPB_NaCl_Private_NaClDebugEnabledForURL, 5159 .NaClDebugEnabledForURL = (PP_Bool (*)(const char* alleged_nmf_url))&Pnacl_M 25_PPB_NaCl_Private_NaClDebugEnabledForURL,
5154 .GetSandboxArch = (const char* (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetSand boxArch, 5160 .GetSandboxArch = (const char* (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetSand boxArch,
5155 .GetUrlScheme = (PP_UrlSchemeType (*)(struct PP_Var url))&Pnacl_M25_PPB_NaCl _Private_GetUrlScheme, 5161 .GetUrlScheme = (PP_UrlSchemeType (*)(struct PP_Var url))&Pnacl_M25_PPB_NaCl _Private_GetUrlScheme,
5156 .LogToConsole = (void (*)(PP_Instance instance, const char* message))&Pnacl_ M25_PPB_NaCl_Private_LogToConsole, 5162 .LogToConsole = (void (*)(PP_Instance instance, const char* message))&Pnacl_ M25_PPB_NaCl_Private_LogToConsole,
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
6225 6231
6226 /* Initialize the real_iface if it hasn't been. The wrapper depends on it. */ 6232 /* Initialize the real_iface if it hasn't been. The wrapper depends on it. */
6227 if (wrapper->real_iface == NULL) { 6233 if (wrapper->real_iface == NULL) {
6228 const void *iface = (*__real_PPPGetInterface)(name); 6234 const void *iface = (*__real_PPPGetInterface)(name);
6229 if (NULL == iface) return NULL; 6235 if (NULL == iface) return NULL;
6230 wrapper->real_iface = iface; 6236 wrapper->real_iface = iface;
6231 } 6237 }
6232 6238
6233 return wrapper->wrapped_iface; 6239 return wrapper->wrapped_iface;
6234 } 6240 }
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/plugin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698