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

Unified Diff: base/memory/shared_memory_win.cc

Issue 2727673003: Clean up: Name is always not empty in SharedMemory on Windows (Closed)
Patch Set: Created 3 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 1eba23b846b8da56377f2c88a9cf37e287325faa..9b6135e8b2fb12cb4787bee0a0fc235569bb4281 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -257,8 +257,9 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
rand_values[0], rand_values[1],
rand_values[2], rand_values[3]);
}
- mapped_file_.Set(CreateFileMappingWithReducedPermissions(
- &sa, rounded_size, name_.empty() ? nullptr : name_.c_str()));
+ DCHECK(!name_.empty());
+ mapped_file_.Set(CreateFileMappingWithReducedPermissions(&sa, rounded_size,
+ name_.c_str()));
if (!mapped_file_.IsValid()) {
// The error is logged within CreateFileMappingWithReducedPermissions().
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