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

Side by Side Diff: base/process_util_mac.mm

Issue 11348360: Speculatively reverting 166585 to see if it fixes issue 160300 - 6% startup regression on Mac 10.6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 812
813 // === C++ operator new === 813 // === C++ operator new ===
814 814
815 void oom_killer_new() { 815 void oom_killer_new() {
816 debug::BreakDebugger(); 816 debug::BreakDebugger();
817 } 817 }
818 818
819 // === Core Foundation CFAllocators === 819 // === Core Foundation CFAllocators ===
820 820
821 bool CanGetContextForCFAllocator() { 821 bool CanGetContextForCFAllocator() {
822 return !base::mac::IsOSLaterThanMountainLion_DontCallThis(); 822 return !base::mac::
823 IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement();
823 } 824 }
824 825
825 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) { 826 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
826 if (base::mac::IsOSSnowLeopard()) { 827 if (base::mac::IsOSSnowLeopard()) {
827 ChromeCFAllocatorLeopards* our_allocator = 828 ChromeCFAllocatorLeopards* our_allocator =
828 const_cast<ChromeCFAllocatorLeopards*>( 829 const_cast<ChromeCFAllocatorLeopards*>(
829 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator)); 830 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator));
830 return &our_allocator->_context; 831 return &our_allocator->_context;
831 } else if (base::mac::IsOSLion() || base::mac::IsOSMountainLion()) { 832 } else if (base::mac::IsOSLion() || base::mac::IsOSMountainLion()) {
832 ChromeCFAllocatorLions* our_allocator = 833 ChromeCFAllocatorLions* our_allocator =
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 } 1255 }
1255 } 1256 }
1256 1257
1257 } // namespace 1258 } // namespace
1258 1259
1259 void EnsureProcessTerminated(ProcessHandle process) { 1260 void EnsureProcessTerminated(ProcessHandle process) {
1260 WaitForChildToDie(process, kWaitBeforeKillSeconds); 1261 WaitForChildToDie(process, kWaitBeforeKillSeconds);
1261 } 1262 }
1262 1263
1263 } // namespace base 1264 } // 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