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

Unified Diff: src/trusted/service_runtime/sel_main_chrome.c

Issue 9535001: Add validation caching interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Edits Created 8 years, 10 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/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);
/*

Powered by Google App Engine
This is Rietveld 408576698