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

Unified Diff: third_party/WebKit/Source/wtf/Allocator.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.h ('k') | third_party/WebKit/Source/wtf/Deque.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Allocator.h
diff --git a/third_party/WebKit/Source/wtf/Allocator.h b/third_party/WebKit/Source/wtf/Allocator.h
index 1f41d19cdb63ad04e61df348acbfa00834c64555..0f061751e27f09a83104c4e45baa27be1938dcf8 100644
--- a/third_party/WebKit/Source/wtf/Allocator.h
+++ b/third_party/WebKit/Source/wtf/Allocator.h
@@ -23,24 +23,24 @@ namespace WTF {
// in to raw pointers, but for now Members indicate that we have thought
// about them and explicitly taken care of them.)
//
-// DISALLOW_ALLOCATION(): Cannot be allocated with new operators but can be a
+// DISALLOW_NEW(): Cannot be allocated with new operators but can be a
// part of object. If it has Members you need a trace method and the containing
// object needs to call that trace method.
//
-// ALLOW_ONLY_INLINE_ALLOCATION(): Allows only placement new operator. This
+// DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(): Allows only placement new operator. This
// disallows general allocation of this object but allows to put the object as a
// value object in collections. If these have Members you need to have a trace
// method. That trace method will be called automatically by the on-heap
// collections.
//
-#define DISALLOW_ALLOCATION() \
+#define DISALLOW_NEW() \
private: \
void* operator new(size_t) = delete; \
void* operator new(size_t, NotNullTag, void*) = delete; \
void* operator new(size_t, void*) = delete; \
public:
-#define ALLOW_ONLY_INLINE_ALLOCATION() \
+#define DISALLOW_NEW_EXCEPT_PLACEMENT_NEW() \
public: \
using IsAllowOnlyInlineAllocation = int; \
void* operator new(size_t, NotNullTag, void* location) { return location; } \
@@ -68,7 +68,7 @@ namespace WTF {
void* operator new(size_t, void*) = delete; \
public:
#else
-#define STACK_ALLOCATED() DISALLOW_ALLOCATION()
+#define STACK_ALLOCATED() DISALLOW_NEW()
#endif
// Provides customizable overrides of fastMalloc/fastFree and operator new/delete
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.h ('k') | third_party/WebKit/Source/wtf/Deque.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698