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

Unified Diff: Source/wtf/FastAllocBase.h

Issue 22038002: Get rid of the tryFast*alloc API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review item. Created 7 years, 4 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 | « Source/wtf/ArrayBufferContents.cpp ('k') | Source/wtf/FastMalloc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/FastAllocBase.h
diff --git a/Source/wtf/FastAllocBase.h b/Source/wtf/FastAllocBase.h
index 60af96f56e6a1fd0567ea40f1265c69e53914f25..718ff7ec6bbb97a0d6ad9da410aa2fc6b54a3f80 100644
--- a/Source/wtf/FastAllocBase.h
+++ b/Source/wtf/FastAllocBase.h
@@ -47,8 +47,6 @@
// };
//
-#include <new>
-#include <stdint.h>
#include "wtf/Assertions.h"
#include "wtf/FastMalloc.h"
#include "wtf/StdLibExtras.h"
@@ -60,27 +58,21 @@ public: \
\
void* operator new(size_t size) \
{ \
- void* p = ::WTF::fastMalloc(size); \
- ::WTF::fastMallocMatchValidateMalloc(p, ::WTF::Internal::AllocTypeClassNew); \
- return p; \
+ return ::WTF::fastMalloc(size); \
} \
\
void operator delete(void* p) \
{ \
- ::WTF::fastMallocMatchValidateFree(p, ::WTF::Internal::AllocTypeClassNew); \
::WTF::fastFree(p); \
} \
\
void* operator new[](size_t size) \
{ \
- void* p = ::WTF::fastMalloc(size); \
- ::WTF::fastMallocMatchValidateMalloc(p, ::WTF::Internal::AllocTypeClassNewArray); \
- return p; \
+ return ::WTF::fastMalloc(size); \
} \
\
void operator delete[](void* p) \
{ \
- ::WTF::fastMallocMatchValidateFree(p, ::WTF::Internal::AllocTypeClassNewArray); \
::WTF::fastFree(p); \
} \
void* operator new(size_t, NotNullTag, void* location) \
« no previous file with comments | « Source/wtf/ArrayBufferContents.cpp ('k') | Source/wtf/FastMalloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698