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

Unified Diff: base/memory/shared_memory_win.cc

Issue 950993003: On Windows, if intention for shared memory name is empty then we pass NULL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/memory/shared_memory_win.cc
diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
index 20659ab97af7b1d3220c077d69435146db226f3e..7e0cf0bf23e67f0d13d22e56e0924cecda7456ce 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -144,7 +144,8 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
rand_values[2], rand_values[3]);
}
mapped_file_ = CreateFileMapping(INVALID_HANDLE_VALUE, &sa,
- PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size), name_.c_str());
+ PAGE_READWRITE, 0, static_cast<DWORD>(rounded_size),
+ name_.empty() ? nullptr : name_.c_str());
if (!mapped_file_)
return false;
« 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