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

Side by Side Diff: base/process/memory.cc

Issue 1531443002: Update base to extend NaCl support (needed for skia support) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« base/process/memory.h ('K') | « base/process/memory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/debug/alias.h" 5 #include "base/debug/alias.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/process/memory.h" 7 #include "base/process/memory.h"
8 8
9 namespace base { 9 namespace base {
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 if (!UncheckedMalloc(alloc_size, result)) 39 if (!UncheckedMalloc(alloc_size, result))
40 return false; 40 return false;
41 41
42 memset(*result, 0, alloc_size); 42 memset(*result, 0, alloc_size);
43 return true; 43 return true;
44 } 44 }
45 45
46 #endif 46 #endif
47 47
48 #if defined(OS_NACL)
49 bool UncheckedMalloc(size_t size, void** result) {
50 *result = malloc(size);
51 return *result != NULL;
52 }
53 #endif
54
48 } // namespace base 55 } // namespace base
OLDNEW
« base/process/memory.h ('K') | « base/process/memory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698