Index: src/trusted/service_runtime/sel_main_chrome.c |
diff --git a/src/trusted/service_runtime/sel_main_chrome.c b/src/trusted/service_runtime/sel_main_chrome.c |
index 198fe8893974e76be60dbe5ff5439cbcfc956ddb..ce0b3a718e2d208c11431551469ee90239879c80 100644 |
--- a/src/trusted/service_runtime/sel_main_chrome.c |
+++ b/src/trusted/service_runtime/sel_main_chrome.c |
@@ -29,6 +29,7 @@ |
#include "native_client/src/trusted/service_runtime/sel_ldr.h" |
#include "native_client/src/trusted/service_runtime/sel_qualify.h" |
#include "native_client/src/trusted/service_runtime/win/exception_patch/ntdll_patch.h" |
+#include "native_client/src/trusted/validator/validation_cache.h" |
int verbosity = 0; |
@@ -73,6 +74,13 @@ static void NaClLoadIrt(struct NaClApp *nap) { |
(*NACL_VTBL(Gio, gio_desc)->Dtor)(gio_desc); |
} |
+static NaClValidationCache *g_validation_cache = NULL; |
Mark Seaborn
2012/03/01 00:26:20
Move this to the global vars block at the top
Nick Bray (chromium)
2012/03/01 01:25:16
Done.
|
+ |
+/* TODO(ncbray) consolidate Chrome's sel_ldr setup to a single function. */ |
Mark Seaborn
2012/03/01 00:26:20
NaClSetIrtFileDesc() is in sel_ldr.h so this shoul
|
+void NaClSetValidationCache(NaClValidationCache *cache) { |
+ g_validation_cache = cache; |
+} |
+ |
void NaClMainForChromium(int handle_count, const NaClHandle *handles, |
int debug) { |
char *av[1]; |
@@ -108,6 +116,9 @@ void NaClMainForChromium(int handle_count, const NaClHandle *handles, |
errcode = LOAD_OK; |
+ /* Inject the validation caching interface, if it exists. */ |
+ nap->validation_cache = g_validation_cache; |
+ |
NaClAppInitialDescriptorHookup(nap); |
/* |