Chromium Code Reviews| Index: ppapi/nacl_irt/manifest_service.cc |
| diff --git a/ppapi/nacl_irt/manifest_service.cc b/ppapi/nacl_irt/manifest_service.cc |
| index 441c401e92381ff529b53325452992a50709fef4..c2b0e39c6997b7324e5005c10008246ba2df7790 100644 |
| --- a/ppapi/nacl_irt/manifest_service.cc |
| +++ b/ppapi/nacl_irt/manifest_service.cc |
| @@ -84,14 +84,16 @@ bool ManifestService::OpenResource(const char* file, int* fd) { |
| // Specifically, PNaCl doesn't support open resource. |
| ppapi::proxy::SerializedHandle ipc_fd; |
| if (!filter_->Send(new PpapiHostMsg_OpenResource( |
| - std::string(kFilePrefix) + file, &ipc_fd)) || |
| - !ipc_fd.is_file()) { |
|
Mark Seaborn
2014/08/07 04:46:23
Is this change required to fix something? Maybe c
teravest
2014/08/07 18:47:02
Removing this condition is required as part of thi
|
| + std::string(kFilePrefix) + file, &ipc_fd))) { |
| LOG(ERROR) << "ManifestService::OpenResource failed:" << file; |
| *fd = -1; |
| return false; |
| } |
| - *fd = ipc_fd.descriptor().fd; |
| + if (ipc_fd.is_file()) |
| + *fd = ipc_fd.descriptor().fd; |
|
Mark Seaborn
2014/08/07 04:46:23
Nit: I think multi-line ifs are meant to use {}s
teravest
2014/08/07 18:47:02
The rule is that the if and else clauses must agre
|
| + else |
| + *fd = -1; |
| return true; |
| } |
| @@ -105,7 +107,6 @@ int IrtOpenResource(const char* file, int* fd) { |
| !manifest_service->OpenResource(file, fd)) { |
| return NACL_ABI_EIO; |
| } |
| - |
| return (*fd == -1) ? NACL_ABI_ENOENT : 0; |
| } |