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

Side by Side Diff: base/process_util_mac.mm

Issue 11369186: Merge trunk r166585 to the 24.0.1312 branch. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/mac/mac_util_unittest.mm ('k') | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <crt_externs.h> 8 #include <crt_externs.h>
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <errno.h> 10 #include <errno.h>
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 796
797 // === C++ operator new === 797 // === C++ operator new ===
798 798
799 void oom_killer_new() { 799 void oom_killer_new() {
800 debug::BreakDebugger(); 800 debug::BreakDebugger();
801 } 801 }
802 802
803 // === Core Foundation CFAllocators === 803 // === Core Foundation CFAllocators ===
804 804
805 bool CanGetContextForCFAllocator() { 805 bool CanGetContextForCFAllocator() {
806 return !base::mac:: 806 return !base::mac::IsOSLaterThanMountainLion_DontCallThis();
807 IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement();
808 } 807 }
809 808
810 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) { 809 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
811 if (base::mac::IsOSSnowLeopard()) { 810 if (base::mac::IsOSSnowLeopard()) {
812 ChromeCFAllocatorLeopards* our_allocator = 811 ChromeCFAllocatorLeopards* our_allocator =
813 const_cast<ChromeCFAllocatorLeopards*>( 812 const_cast<ChromeCFAllocatorLeopards*>(
814 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator)); 813 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator));
815 return &our_allocator->_context; 814 return &our_allocator->_context;
816 } else if (base::mac::IsOSLion() || base::mac::IsOSMountainLion()) { 815 } else if (base::mac::IsOSLion() || base::mac::IsOSMountainLion()) {
817 ChromeCFAllocatorLions* our_allocator = 816 ChromeCFAllocatorLions* our_allocator =
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 } 1238 }
1240 } 1239 }
1241 1240
1242 } // namespace 1241 } // namespace
1243 1242
1244 void EnsureProcessTerminated(ProcessHandle process) { 1243 void EnsureProcessTerminated(ProcessHandle process) {
1245 WaitForChildToDie(process, kWaitBeforeKillSeconds); 1244 WaitForChildToDie(process, kWaitBeforeKillSeconds);
1246 } 1245 }
1247 1246
1248 } // namespace base 1247 } // namespace base
OLDNEW
« no previous file with comments | « base/mac/mac_util_unittest.mm ('k') | chrome/browser/chrome_browser_main_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698