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

Side by Side Diff: third_party/WebKit/Source/wtf/allocator/PartitionAllocator.h

Issue 1992873004: Replace all occurrences of RELEASE_ASSERT in wtf with CHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Specialized dchecks in utils.h. Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 }; 49 };
50 50
51 class WTF_EXPORT PartitionAllocator { 51 class WTF_EXPORT PartitionAllocator {
52 public: 52 public:
53 typedef PartitionAllocatorDummyVisitor Visitor; 53 typedef PartitionAllocatorDummyVisitor Visitor;
54 static const bool isGarbageCollected = false; 54 static const bool isGarbageCollected = false;
55 55
56 template<typename T> 56 template<typename T>
57 static size_t quantizedSize(size_t count) 57 static size_t quantizedSize(size_t count)
58 { 58 {
59 RELEASE_ASSERT(count <= kGenericMaxDirectMapped / sizeof(T)); 59 CHECK_LE(count, kGenericMaxDirectMapped / sizeof(T));
60 return partitionAllocActualSize(Partitions::bufferPartition(), count * s izeof(T)); 60 return partitionAllocActualSize(Partitions::bufferPartition(), count * s izeof(T));
61 } 61 }
62 template <typename T> 62 template <typename T>
63 static T* allocateVectorBacking(size_t size) 63 static T* allocateVectorBacking(size_t size)
64 { 64 {
65 return reinterpret_cast<T*>(allocateBacking(size, WTF_HEAP_PROFILER_TYPE _NAME(T))); 65 return reinterpret_cast<T*>(allocateBacking(size, WTF_HEAP_PROFILER_TYPE _NAME(T)));
66 } 66 }
67 template <typename T> 67 template <typename T>
68 static T* allocateExpandedVectorBacking(size_t size) 68 static T* allocateExpandedVectorBacking(size_t size)
69 { 69 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 { \ 154 { \
155 ASSERT(location); \ 155 ASSERT(location); \
156 return location; \ 156 return location; \
157 } \ 157 } \
158 private: \ 158 private: \
159 typedef int __thisIsHereToForceASemicolonAfterThisMacro 159 typedef int __thisIsHereToForceASemicolonAfterThisMacro
160 160
161 using WTF::PartitionAllocator; 161 using WTF::PartitionAllocator;
162 162
163 #endif // WTF_PartitionAllocator_h 163 #endif // WTF_PartitionAllocator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698