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

Unified Diff: ppapi/nacl_irt/manifest_service.cc

Issue 836273002: Revert of Remove nonsfi token workaround. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/nacl_irt/manifest_service.cc
diff --git a/ppapi/nacl_irt/manifest_service.cc b/ppapi/nacl_irt/manifest_service.cc
index 8e671b90ceac9f24df864d175a373eb38c643968..c9f1404e44473b51e831fa3fc36ea6c491601de5 100644
--- a/ppapi/nacl_irt/manifest_service.cc
+++ b/ppapi/nacl_irt/manifest_service.cc
@@ -92,8 +92,8 @@
// File tokens are ignored here, but needed when the message is processed
// inside NaClIPCAdapter.
- uint64_t file_token_lo = 0;
- uint64_t file_token_hi = 0;
+ uint64_t file_token_lo;
+ uint64_t file_token_hi;
if (!filter_->Send(new PpapiHostMsg_OpenResource(
std::string(kFilePrefix) + file,
&ipc_fd,
@@ -104,11 +104,16 @@
return false;
}
+#if defined(OS_NACL_SFI)
// File tokens are used internally by NaClIPCAdapter and should have
// been cleared from the message when it is received here.
- // These tokens should never be set for Non-SFI mode.
+ // Note that, on Non-SFI NaCl, the IPC channel is directly connected to the
+ // renderer process, so NaClIPCAdapter does not work. It means,
+ // file_token_{lo,hi} fields may be properly filled, although it is just
+ // ignored here.
CHECK(file_token_lo == 0);
CHECK(file_token_hi == 0);
+#endif
// Copy the file if we received a valid file descriptor. Otherwise, if we got
// a reply, the file doesn't exist, so provide an fd of -1.
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698