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

Unified Diff: src/trusted/validator/x86/32/ncvalidate_verbose.c

Issue 10116004: Eliminate bundle_size parameter from validator interface. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Merge Created 8 years, 8 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/32/ncvalidate_verbose.c
diff --git a/src/trusted/validator/x86/32/ncvalidate_verbose.c b/src/trusted/validator/x86/32/ncvalidate_verbose.c
index 001ad15bbc0a35224963cb552257030b68d4da06..cf35b2a236ed62a755a89f10a11457fbb15e1035 100644
--- a/src/trusted/validator/x86/32/ncvalidate_verbose.c
+++ b/src/trusted/validator/x86/32/ncvalidate_verbose.c
@@ -28,12 +28,11 @@ static NaClValidationStatus NCApplyValidatorVerbosely_x86_32(
uintptr_t guest_addr,
uint8_t *data,
size_t size,
- int bundle_size,
const NaClCPUFeaturesX86 *cpu_features) {
int validator_result = 0;
struct NCValidatorState *vstate;
- vstate = NCValidateInitDetailed(guest_addr, size, bundle_size, cpu_features);
+ vstate = NCValidateInitDetailed(guest_addr, size, cpu_features);
if (vstate == NULL) return NaClValidationFailedOutOfMemory;
NCValidateSetNumDiagnostics(vstate, -1); /* Reports all errors. */
NCValidateSetErrorReporter(vstate, &kNCVerboseErrorReporter);
@@ -49,15 +48,12 @@ NaClValidationStatus NACL_SUBARCH_NAME(ApplyValidatorVerbosely, x86, 32)
uintptr_t guest_addr,
uint8_t *data,
size_t size,
- int bundle_size,
const NaClCPUFeaturesX86 *cpu_features) {
- NaClValidationStatus status = NaClValidationFailedNotImplemented;
assert(NACL_SB_DEFAULT == sb_kind);
- if (bundle_size == 16 || bundle_size == 32) {
- if (!NaClArchSupported(cpu_features))
- return NaClValidationFailedCpuNotSupported;
- status = NCApplyValidatorVerbosely_x86_32(
- guest_addr, data, size, bundle_size, cpu_features);
- }
- return status;
+
+ if (!NaClArchSupported(cpu_features))
+ return NaClValidationFailedCpuNotSupported;
+
+ return NCApplyValidatorVerbosely_x86_32(
+ guest_addr, data, size, cpu_features);
}

Powered by Google App Engine
This is Rietveld 408576698