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

Unified Diff: base/memory/discardable_shared_memory.cc

Issue 1497843002: mac: Back discardable shared memory with a Mach primitive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/discardable_shared_memory.cc
diff --git a/base/memory/discardable_shared_memory.cc b/base/memory/discardable_shared_memory.cc
index 2b0cfd0fbdecb1db6e6cb3db26ded8bb57ac7f99..24bd3e3c720e880839709e0e1fd49717661768a3 100644
--- a/base/memory/discardable_shared_memory.cc
+++ b/base/memory/discardable_shared_memory.cc
@@ -122,15 +122,8 @@ bool DiscardableSharedMemory::CreateAndMap(size_t size) {
if (!checked_size.IsValid())
return false;
-#if defined(OS_MACOSX) && !defined(OS_IOS)
- // DiscardableSharedMemory does not yet support a Mach-implementation, so
- // force the underlying primitive to be a POSIX fd. https://crbug.com/547239.
- if (!shared_memory_.CreateAndMapAnonymousPosix(checked_size.ValueOrDie()))
- return false;
-#else
if (!shared_memory_.CreateAndMapAnonymous(checked_size.ValueOrDie()))
return false;
-#endif // defined(OS_MACOSX) && !defined(OS_IOS)
mapped_size_ =
shared_memory_.mapped_size() - AlignToPageSize(sizeof(SharedState));
« 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