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

Side by Side Diff: base/process_util_mac.mm

Issue 7550042: Merge trunk r93436 to the 13.0.782 branch to eliminate unhelpful log spew (Closed) Base URL: svn://svn.chromium.org/chrome/branches/782/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | third_party/apple_apsl/CFBase.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 5
6 #include "base/process_util.h" 6 #include "base/process_util.h"
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <crt_externs.h> 9 #include <crt_externs.h>
10 #include <dlfcn.h> 10 #include <dlfcn.h>
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 616
617 // === C++ operator new === 617 // === C++ operator new ===
618 618
619 void oom_killer_new() { 619 void oom_killer_new() {
620 debug::BreakDebugger(); 620 debug::BreakDebugger();
621 } 621 }
622 622
623 // === Core Foundation CFAllocators === 623 // === Core Foundation CFAllocators ===
624 624
625 bool CanGetContextForCFAllocator(long darwin_version) { 625 bool CanGetContextForCFAllocator(long darwin_version) {
626 // TODO(avi): remove at final release; http://crbug.com/74589
627 if (darwin_version == 11) {
628 NSLog(@"Unsure about the internals of CFAllocator but going to patch them "
629 "anyway. Watch out for crashes inside of CFAllocatorAllocate.");
630 }
631 return darwin_version == 9 || 626 return darwin_version == 9 ||
632 darwin_version == 10 || 627 darwin_version == 10 ||
633 darwin_version == 11; 628 darwin_version == 11;
634 } 629 }
635 630
636 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator, 631 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator,
637 long darwin_version) { 632 long darwin_version) {
638 if (darwin_version == 9 || darwin_version == 10) { 633 if (darwin_version == 9 || darwin_version == 10) {
639 ChromeCFAllocator9and10* our_allocator = 634 ChromeCFAllocator9and10* our_allocator =
640 const_cast<ChromeCFAllocator9and10*>( 635 const_cast<ChromeCFAllocator9and10*>(
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 if (sysctl(mib, 4, &info, &length, NULL, 0) < 0) { 909 if (sysctl(mib, 4, &info, &length, NULL, 0) < 0) {
915 PLOG(ERROR) << "sysctl"; 910 PLOG(ERROR) << "sysctl";
916 return -1; 911 return -1;
917 } 912 }
918 if (length == 0) 913 if (length == 0)
919 return -1; 914 return -1;
920 return info.kp_eproc.e_ppid; 915 return info.kp_eproc.e_ppid;
921 } 916 }
922 917
923 } // namespace base 918 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | third_party/apple_apsl/CFBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698