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

Side by Side Diff: base/process_util_mac.mm

Issue 9845017: Fix a few warnings that -Wnull-conversion of a future clang will complain about. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 | « base/mac/scoped_ioobject.h ('k') | chrome/browser/mac/install_from_dmg.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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 !g_old_memalign_purgeable) << "Old allocators unexpectedly non-null"; 827 !g_old_memalign_purgeable) << "Old allocators unexpectedly non-null";
828 828
829 // See http://trac.webkit.org/changeset/53362/trunk/Tools/DumpRenderTree/mac 829 // See http://trac.webkit.org/changeset/53362/trunk/Tools/DumpRenderTree/mac
830 bool zone_allocators_protected = base::mac::IsOSLionOrLater(); 830 bool zone_allocators_protected = base::mac::IsOSLionOrLater();
831 831
832 ChromeMallocZone* default_zone = 832 ChromeMallocZone* default_zone =
833 reinterpret_cast<ChromeMallocZone*>(malloc_default_zone()); 833 reinterpret_cast<ChromeMallocZone*>(malloc_default_zone());
834 ChromeMallocZone* purgeable_zone = 834 ChromeMallocZone* purgeable_zone =
835 reinterpret_cast<ChromeMallocZone*>(GetPurgeableZone()); 835 reinterpret_cast<ChromeMallocZone*>(GetPurgeableZone());
836 836
837 vm_address_t page_start_default = NULL; 837 vm_address_t page_start_default = 0;
838 vm_address_t page_start_purgeable = NULL; 838 vm_address_t page_start_purgeable = 0;
839 vm_size_t len_default = 0; 839 vm_size_t len_default = 0;
840 vm_size_t len_purgeable = 0; 840 vm_size_t len_purgeable = 0;
841 if (zone_allocators_protected) { 841 if (zone_allocators_protected) {
842 page_start_default = reinterpret_cast<vm_address_t>(default_zone) & 842 page_start_default = reinterpret_cast<vm_address_t>(default_zone) &
843 static_cast<vm_size_t>(~(getpagesize() - 1)); 843 static_cast<vm_size_t>(~(getpagesize() - 1));
844 len_default = reinterpret_cast<vm_address_t>(default_zone) - 844 len_default = reinterpret_cast<vm_address_t>(default_zone) -
845 page_start_default + sizeof(ChromeMallocZone); 845 page_start_default + sizeof(ChromeMallocZone);
846 mprotect(reinterpret_cast<void*>(page_start_default), len_default, 846 mprotect(reinterpret_cast<void*>(page_start_default), len_default,
847 PROT_READ | PROT_WRITE); 847 PROT_READ | PROT_WRITE);
848 848
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 } // namespace 1155 } // namespace
1156 1156
1157 void EnsureProcessTerminated(ProcessHandle process) { 1157 void EnsureProcessTerminated(ProcessHandle process) {
1158 WaitForChildToDie(process, kWaitBeforeKillSeconds); 1158 WaitForChildToDie(process, kWaitBeforeKillSeconds);
1159 } 1159 }
1160 1160
1161 } // namespace base 1161 } // namespace base
OLDNEW
« no previous file with comments | « base/mac/scoped_ioobject.h ('k') | chrome/browser/mac/install_from_dmg.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698