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

Unified Diff: src/trusted/validator_x86/ncenuminsts_x86_64.c

Issue 10134056: Refactor the process of choosing validators. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebased, added a todo for NaClCopyCode Created 8 years, 6 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/validator_x86/ncenuminsts_x86_64.c
diff --git a/src/trusted/validator_x86/ncenuminsts_x86_64.c b/src/trusted/validator_x86/ncenuminsts_x86_64.c
index 2735ba338a2cea048120f1f077bcba6d496ad8e4..722020df416d59d630c0cf35357e753aec43bc35 100644
--- a/src/trusted/validator_x86/ncenuminsts_x86_64.c
+++ b/src/trusted/validator_x86/ncenuminsts_x86_64.c
@@ -161,10 +161,13 @@ Bool NaClSegmentValidates(uint8_t* mbase,
NaClPcAddress vbase) {
NaClCPUFeaturesX86 cpu_features;
NaClValidationStatus status;
+ /* TODO(pasko): Validator initialization can be slow, make it run only once.
+ */
+ const struct NaClValidatorInterface *validator = NaClCreateValidator();
/* check if NaCl thinks the given code segment is valid. */
NaClSetAllCPUFeatures(&cpu_features);
- status = NaCl_ApplyValidator_x86_64(
+ status = validator->Validate(
vbase, mbase, size,
/* stubout_mode= */ FALSE, /* readonly_text= */ FALSE, &cpu_features,
NULL);
« src/trusted/validator_x86/nccopycode.c ('K') | « src/trusted/validator_x86/ncenuminsts_x86_32.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698