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

Unified Diff: ppapi/proxy/irt_ppapi.c

Issue 164373010: Split the PNaCl IRT shim into 3 pieces, and include one piece into IRT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/irt_ppapi.c
diff --git a/ppapi/proxy/irt_ppapi.c b/ppapi/proxy/irt_ppapi.c
index 24dafdb077d605527c48074c5b599e273d27c30f..8bf1233e887516c4bddc147d0c0df6b8e49ea02c 100644
--- a/ppapi/proxy/irt_ppapi.c
+++ b/ppapi/proxy/irt_ppapi.c
@@ -5,14 +5,16 @@
*/
#include "native_client/src/public/irt_core.h"
+#include "native_client/src/trusted/service_runtime/include/sys/unistd.h"
#include "native_client/src/untrusted/irt/irt.h"
#include "native_client/src/untrusted/irt/irt_private.h"
#include "ppapi/nacl_irt/irt_ppapi.h"
+#include "ppapi/native_client/src/untrusted/pnacl_irt_shim/irt_shim_ppapi.h"
#include "ppapi/proxy/plugin_main_irt.h"
-struct PP_StartFunctions g_pp_functions;
+static struct PP_StartFunctions g_pp_functions;
-static int irt_ppapi_start(const struct PP_StartFunctions* funcs) {
+int irt_ppapi_start(const struct PP_StartFunctions* funcs) {
/* Disable NaCl's open_resource() interface on this thread. */
g_is_main_thread = 1;
@@ -38,9 +40,19 @@ static const struct nacl_irt_ppapihook nacl_irt_ppapihook = {
PpapiPluginRegisterThreadCreator,
};
+static int ppapihook_pnacl_private_filter(void) {
+ int pnacl_mode = sysconf(NACL_ABI__SC_NACL_PNACL_MODE);
+ if (pnacl_mode == -1)
+ return 0;
+ return pnacl_mode;
+}
+
static const struct nacl_irt_interface irt_interfaces[] = {
{ NACL_IRT_PPAPIHOOK_v0_1, &nacl_irt_ppapihook, sizeof(nacl_irt_ppapihook),
NULL },
+ { NACL_IRT_PPAPIHOOK_PNACL_PRIVATE_v0_1,
+ &nacl_irt_ppapihook_pnacl_private, sizeof(nacl_irt_ppapihook_pnacl_private),
+ ppapihook_pnacl_private_filter },
};
static size_t chrome_irt_query(const char* interface_ident,
« no previous file with comments | « ppapi/proxy/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698