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

Unified Diff: chrome/nacl/nacl_ipc_adapter.cc

Issue 15274002: Do not translate the file open flags other than read/write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl/nacl_ipc_adapter.cc
diff --git a/chrome/nacl/nacl_ipc_adapter.cc b/chrome/nacl/nacl_ipc_adapter.cc
index 58c6fb2cd2b5b54dce56f1480b731b23f4f63bc3..716c6b6a338671ee98e6134a9a6a3cce876b52ba 100644
--- a/chrome/nacl/nacl_ipc_adapter.cc
+++ b/chrome/nacl/nacl_ipc_adapter.cc
@@ -119,8 +119,12 @@ int TranslatePepperFileOpenFlags(int32_t pp_open_flags) {
nacl_open_flag |= NACL_ABI_O_CREAT;
if (pp_open_flags & PP_FILEOPENFLAG_TRUNCATE)
nacl_open_flag |= NACL_ABI_O_TRUNC;
+#if 0
Mark Seaborn 2013/05/17 14:02:35 Don't disable code with "#if 0" -- why don't you j
mazda 2013/05/17 22:09:55 Deleted the code and added a test.
+ // NaCl does not support NACL_ABI_O_EXCL yet and sending the flag can cause
+ // NaCl module to crash, so we discard the flag here for now.
if (pp_open_flags & PP_FILEOPENFLAG_EXCLUSIVE)
nacl_open_flag |= NACL_ABI_O_EXCL;
bsy 2013/05/17 16:38:52 TranslatePepperFileOpenFlags is used at line 452 b
mazda 2013/05/17 22:09:55 Changed the code not to include NACL_ABI_O_EXCL, N
+#endif
return nacl_open_flag;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698