Chromium Code Reviews| Index: src/untrusted/irt/irt_ppapi.c |
| =================================================================== |
| --- src/untrusted/irt/irt_ppapi.c (revision 6384) |
| +++ src/untrusted/irt/irt_ppapi.c (working copy) |
| @@ -9,10 +9,19 @@ |
| #include "native_client/src/untrusted/irt/irt_ppapi.h" |
| struct PP_StartFunctions g_pp_functions; |
| +int ppapi_pre_initialized = 0; |
| +static void irt_ppapi_pre_start() { |
|
pasko-google - do not use
2011/08/10 21:16:33
blah_pre_start is not a self descriptive name, I w
halyavin
2011/08/12 08:52:07
This code is rewritten.
|
| + ppapi_pre_initialized = 1; |
| + PpapiPluginPreInit(); |
| +} |
| + |
| static int irt_ppapi_start(const struct PP_StartFunctions *funcs) { |
| g_pp_functions = *funcs; |
| - return PpapiPluginMain(); |
| + if (!ppapi_pre_initialized) { |
| + irt_ppapi_pre_start(); |
| + } |
| + return PpapiPluginPostInit(); |
| } |
| int32_t PPP_InitializeModule(PP_Module module_id, |
| @@ -40,3 +49,9 @@ |
| irt_ppapi_start, |
| PpapiPluginRegisterThreadCreator, |
| }; |
| + |
| +const struct nacl_irt_ppapihook_0_2 nacl_irt_ppapihook_0_2 = { |
| + irt_ppapi_start, |
| + PpapiPluginRegisterThreadCreator, |
| + irt_ppapi_pre_start, |
| +}; |