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

Unified Diff: base/process/memory_mac.mm

Issue 2129273002: mac: Update knowledge of CFAllocator internals for 10.12 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Diet Created 4 years, 5 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 | « base/mac/mac_util_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/memory_mac.mm
diff --git a/base/process/memory_mac.mm b/base/process/memory_mac.mm
index 23a4beb60e8dbef8e0c9bd1ddd051ccfd31e6cbd..32fdd38821dd12054309d7fe2f69d30204df623a 100644
--- a/base/process/memory_mac.mm
+++ b/base/process/memory_mac.mm
@@ -248,19 +248,14 @@ void oom_killer_new() {
// === Core Foundation CFAllocators ===
bool CanGetContextForCFAllocator() {
- return !base::mac::IsOSLaterThanElCapitan_DontCallThis();
+ return !base::mac::IsOSLaterThanSierra_DontCallThis();
}
CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
- if (base::mac::IsOSMavericks() || base::mac::IsOSYosemite() ||
- base::mac::IsOSElCapitan()) {
- ChromeCFAllocatorLions* our_allocator =
- const_cast<ChromeCFAllocatorLions*>(
- reinterpret_cast<const ChromeCFAllocatorLions*>(allocator));
- return &our_allocator->_context;
- } else {
- return NULL;
- }
+ ChromeCFAllocatorLions* our_allocator =
+ const_cast<ChromeCFAllocatorLions*>(
+ reinterpret_cast<const ChromeCFAllocatorLions*>(allocator));
+ return &our_allocator->_context;
}
CFAllocatorAllocateCallBack g_old_cfallocator_system_default;
« no previous file with comments | « base/mac/mac_util_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698