Chromium Code Reviews| Index: ppapi/native_client/src/trusted/plugin/json_manifest.cc |
| =================================================================== |
| --- ppapi/native_client/src/trusted/plugin/json_manifest.cc (revision 193364) |
| +++ ppapi/native_client/src/trusted/plugin/json_manifest.cc (working copy) |
| @@ -252,17 +252,19 @@ |
| } |
| } |
| - // 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()) { |
|
Mark Seaborn
2013/04/18 01:17:46
Why not remove this whole block?
AFAICS, this blo
halyavin
2013/04/18 07:33:27
Once we remove the whole block, absence of URL wil
|
| + // 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; |
| } |