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

Unified Diff: src/untrusted/irt/irt_ppapi.c

Issue 7605029: Extend IRT with nacl_irt_resource_open interface (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: remove empty lines Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
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,
+};

Powered by Google App Engine
This is Rietveld 408576698