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

Unified Diff: base/shared_memory_win.cc

Issue 8585002: Give base::SharedMemory::CreateAnonymous an executable flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
Index: base/shared_memory_win.cc
diff --git a/base/shared_memory_win.cc b/base/shared_memory_win.cc
index 3e5ad36c7136ff7fb953eafc274b4ec5ac71069c..79a4a4fc2b505abb5a4b14eef274b7276af587d0 100644
--- a/base/shared_memory_win.cc
+++ b/base/shared_memory_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -71,15 +71,16 @@ void SharedMemory::CloseHandle(const SharedMemoryHandle& handle) {
}
bool SharedMemory::CreateAndMapAnonymous(uint32 size) {
- return CreateAnonymous(size) && Map(size);
+ return CreateAnonymous(size, flase) && Map(size);
}
-bool SharedMemory::CreateAnonymous(uint32 size) {
- return CreateNamed("", false, size);
+bool SharedMemory::CreateAnonymous(uint32 size, bool executable) {
+ return CreateNamed("", false, size, executable);
}
-bool SharedMemory::CreateNamed(const std::string& name,
- bool open_existing, uint32 size) {
+bool SharedMemory::CreateNamed(const std::string& name, bool open_existing,
+ uint32 size, bool executable) {
+ DCHECK(!executable);
DCHECK(!mapped_file_);
if (size == 0)
return false;

Powered by Google App Engine
This is Rietveld 408576698