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

Unified Diff: ppapi/native_client/src/trusted/plugin/json_manifest.cc

Issue 14069002: Allow to have different files for different ISAs in NaCl manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/trusted/plugin/json_manifest.cc
===================================================================
--- ppapi/native_client/src/trusted/plugin/json_manifest.cc (revision 193870)
+++ ppapi/native_client/src/trusted/plugin/json_manifest.cc (working copy)
@@ -247,22 +247,24 @@
!IsValidPnaclTranslateSpec(property_value, property_name,
parent_key, &error_string)) {
error_info->SetReport(ERROR_MANIFEST_SCHEMA_VALIDATE,
- nacl::string("manifiest: ") + error_string);
+ nacl::string("manifest: ") + error_string);
return false;
}
}
- // TODO(elijahtaylor) add ISA resolver here if we expand ISAs to include
- // micro-architectures that can resolve to multiple valid sandboxes.
- bool has_isa = dictionary.isMember(sandbox_isa);
- bool has_portable = dictionary.isMember(kPortableKey);
+ if (!sandbox_isa.empty()) {
+ // TODO(elijahtaylor) add ISA resolver here if we expand ISAs to include
+ // micro-architectures that can resolve to multiple valid sandboxes.
+ bool has_isa = dictionary.isMember(sandbox_isa);
+ bool has_portable = dictionary.isMember(kPortableKey);
- if (!has_isa && !has_portable) {
- error_info->SetReport(
- ERROR_MANIFEST_PROGRAM_MISSING_ARCH,
- nacl::string("manifest: no version of ") + parent_key +
- " given for current arch and no portable version found.");
- return false;
+ if (!has_isa && !has_portable) {
+ error_info->SetReport(
+ ERROR_MANIFEST_PROGRAM_MISSING_ARCH,
+ nacl::string("manifest: no version of ") + parent_key +
+ " given for current arch and no portable version found.");
+ return false;
+ }
}
return true;
@@ -298,8 +300,12 @@
if (url == NULL || pnacl_options == NULL || error_info == NULL)
return false;
- if (!IsValidISADictionary(dictionary, parent_key, sandbox_isa, error_info))
+ if (!IsValidISADictionary(dictionary, parent_key, sandbox_isa, error_info)) {
+ error_info->SetReport(ERROR_MANIFEST_RESOLVE_URL,
+ "architecture " + sandbox_isa +
+ " is not found for file " + parent_key);
return false;
+ }
*url = "";
@@ -434,7 +440,7 @@
nacl::string file_name = members[i];
if (!IsValidISADictionary(files[file_name],
file_name,
- sandbox_isa_,
+ nacl::string(),
error_info)) {
return false;
}
« no previous file with comments | « no previous file | ppapi/native_client/tests/ppapi_browser/bad/ppapi_bad.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698