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

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

Issue 2752293004: Move files in wtf/ to platform/wtf/ (Part 5). (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 side-by-side diff with in-line comments
Download patch
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 5aacf776cee91fdc08040ce0a390330840d003ab..3bbe5334bc0578776603df626e630f123bb97532 100644
--- a/third_party/WebKit/Source/wtf/Allocator.h
+++ b/third_party/WebKit/Source/wtf/Allocator.h
@@ -6,7 +6,7 @@
#define WTF_Allocator_h
#include "wtf/Assertions.h"
-#include "wtf/StdLibExtras.h"
+#include "wtf/TypeTraits.h"
#include "wtf/allocator/Partitions.h"
namespace WTF {
@@ -146,4 +146,11 @@ namespace WTF {
} // namespace WTF
+// This version of placement new omits a 0 check.
+enum NotNullTag { NotNull };
+inline void* operator new(size_t, NotNullTag, void* location) {
+ DCHECK(location);
+ return location;
+}
+
#endif /* WTF_Allocator_h */
« no previous file with comments | « third_party/WebKit/Source/platform/heap/CallbackStack.cpp ('k') | third_party/WebKit/Source/wtf/StdLibExtras.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698