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

Side by Side Diff: third_party/WebKit/Source/platform/wtf/Allocator.h

Issue 2762943002: Move files in wtf/ to platform/wtf/ (Part 6). (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/wtf/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef WTF_Allocator_h 5 #ifndef WTF_Allocator_h
6 #define WTF_Allocator_h 6 #define WTF_Allocator_h
7 7
8 #include "wtf/Assertions.h" 8 #include "platform/wtf/Assertions.h"
9 #include "wtf/TypeTraits.h" 9 #include "platform/wtf/TypeTraits.h"
10 #include "wtf/allocator/Partitions.h" 10 #include "platform/wtf/allocator/Partitions.h"
11 11
12 namespace WTF { 12 namespace WTF {
13 13
14 // Classes that contain references to garbage-collected objects but aren't 14 // Classes that contain references to garbage-collected objects but aren't
15 // themselves garbaged allocated, have some extra macros available which 15 // themselves garbaged allocated, have some extra macros available which
16 // allows their use to be restricted to cases where the garbage collector 16 // allows their use to be restricted to cases where the garbage collector
17 // is able to discover their references. These macros will be useful for 17 // is able to discover their references. These macros will be useful for
18 // non-garbage-collected objects to avoid unintended allocations. 18 // non-garbage-collected objects to avoid unintended allocations.
19 // 19 //
20 // STACK_ALLOCATED(): Use if the object is only stack allocated. 20 // STACK_ALLOCATED(): Use if the object is only stack allocated.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } // namespace WTF 147 } // namespace WTF
148 148
149 // This version of placement new omits a 0 check. 149 // This version of placement new omits a 0 check.
150 enum NotNullTag { NotNull }; 150 enum NotNullTag { NotNull };
151 inline void* operator new(size_t, NotNullTag, void* location) { 151 inline void* operator new(size_t, NotNullTag, void* location) {
152 DCHECK(location); 152 DCHECK(location);
153 return location; 153 return location;
154 } 154 }
155 155
156 #endif /* WTF_Allocator_h */ 156 #endif /* WTF_Allocator_h */
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/wtf/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698