| 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()) {
|
| + 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;
|
| + 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;
|
| }
|
|
|
|
|