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

Side by Side Diff: base/process_util_mac.mm

Issue 11411343: Revert 170800 - Speculatively reverting 166585 to see if it fixes issue 160300 - 6% startup regres… (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:: 822 return !base::mac::IsOSLaterThanMountainLion_DontCallThis();
823 IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement();
824 } 823 }
825 824
826 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) { 825 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
827 if (base::mac::IsOSSnowLeopard()) { 826 if (base::mac::IsOSSnowLeopard()) {
828 ChromeCFAllocatorLeopards* our_allocator = 827 ChromeCFAllocatorLeopards* our_allocator =
829 const_cast<ChromeCFAllocatorLeopards*>( 828 const_cast<ChromeCFAllocatorLeopards*>(
830 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator)); 829 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator));
831 return &our_allocator->_context; 830 return &our_allocator->_context;
832 } else if (base::mac::IsOSLion() || base::mac::IsOSMountainLion()) { 831 } else if (base::mac::IsOSLion() || base::mac::IsOSMountainLion()) {
833 ChromeCFAllocatorLions* our_allocator = 832 ChromeCFAllocatorLions* our_allocator =
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 } 1254 }
1256 } 1255 }
1257 1256
1258 } // namespace 1257 } // namespace
1259 1258
1260 void EnsureProcessTerminated(ProcessHandle process) { 1259 void EnsureProcessTerminated(ProcessHandle process) {
1261 WaitForChildToDie(process, kWaitBeforeKillSeconds); 1260 WaitForChildToDie(process, kWaitBeforeKillSeconds);
1262 } 1261 }
1263 1262
1264 } // namespace base 1263 } // 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