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

Unified Diff: Source/wtf/Allocator.h

Issue 1278983003: Adding allocator annotations to blink classes and structs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
Index: Source/wtf/Allocator.h
diff --git a/Source/wtf/Allocator.h b/Source/wtf/Allocator.h
index 29adf01267e863cbee05e0b6c84552998bdba987..6e4c8cdfd106660dae9461f59d7c585a22252c63 100644
--- a/Source/wtf/Allocator.h
+++ b/Source/wtf/Allocator.h
@@ -5,6 +5,8 @@
#ifndef WTF_Allocator_h
#define WTF_Allocator_h
+#include "wtf/StdLibExtras.h"
+
namespace WTF {
// Classes that contain references to garbage-collected objects but aren't
@@ -45,7 +47,12 @@ namespace WTF {
#define STATIC_ONLY(Type) \
private: \
- Type() = delete;
+ Type() = delete; \
+ Type(const Type&) = delete; \
+ Type& operator=(const Type&) = delete; \
+ void* operator new(size_t) = delete; \
+ void* operator new(size_t, NotNullTag, void*) = delete; \
+ void* operator new(size_t, void*) = delete;
#if COMPILER(CLANG)
#define STACK_ALLOCATED() \
« Source/bindings/core/v8/WrapperTypeInfo.h ('K') | « Source/web/SharedWorkerRepositoryClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698