Chromium Code Reviews| 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 5536245c201d8c6becfd1678e8ffc203dbfe6940..989ffb0afa08cc507bc5cf2b057a6dd5b5baba4d 100644 |
| --- a/third_party/WebKit/Source/wtf/Allocator.h |
| +++ b/third_party/WebKit/Source/wtf/Allocator.h |
| @@ -94,14 +94,14 @@ namespace WTF { |
| // }; |
| // |
| -#define USING_FAST_MALLOC(type) \ |
| +#define USING_FAST_MALLOC_INTERNAL(type, typeName) \ |
| public: \ |
| void* operator new(size_t, void* p) { return p; } \ |
| void* operator new[](size_t, void* p) { return p; } \ |
| \ |
| void* operator new(size_t size) \ |
| { \ |
| - return ::WTF::Partitions::fastMalloc(size, WTF_HEAP_PROFILER_TYPE_NAME(type)); \ |
| + return ::WTF::Partitions::fastMalloc(size, typeName); \ |
| } \ |
| \ |
| void operator delete(void* p) \ |
| @@ -111,7 +111,7 @@ public: \ |
| \ |
| void* operator new[](size_t size) \ |
| { \ |
| - return ::WTF::Partitions::fastMalloc(size, WTF_HEAP_PROFILER_TYPE_NAME(type)); \ |
| + return ::WTF::Partitions::fastMalloc(size, typeName); \ |
| } \ |
| \ |
| void operator delete[](void* p) \ |
| @@ -130,6 +130,9 @@ public: \ |
| private: \ |
| typedef int __thisIsHereToForceASemicolonAfterThisMacro |
| +#define USING_FAST_MALLOC(type) USING_FAST_MALLOC_INTERNAL(type, WTF_HEAP_PROFILER_TYPE_NAME(type)) |
| +#define USING_FAST_MALLOC_WITH_TYPE_NAME(type) USING_FAST_MALLOC_INTERNAL(type, #type) |
|
haraken
2015/11/27 15:36:10
Add a comment and explain the difference of these
Ruud van Asseldonk
2015/11/27 16:31:19
Done.
|
| + |
| } // namespace WTF |
| #endif /* WTF_Allocator_h */ |