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

Unified Diff: base/shared_memory_posix.cc

Issue 4039: ensure that the shared memory has actually been created before trying to re-u... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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: base/shared_memory_posix.cc
===================================================================
--- base/shared_memory_posix.cc (revision 2481)
+++ base/shared_memory_posix.cc (working copy)
@@ -56,7 +56,7 @@
int posix_flags = 0;
posix_flags |= read_only ? O_RDONLY : O_RDWR;
- if (!open_existing)
+ if (!open_existing || mapped_file_ <= 0)
posix_flags |= O_CREAT;
if (CreateOrOpen(name, posix_flags)) {
« 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