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

Unified Diff: src/allocation.h

Issue 2108273003: Strictly disable instantiation of AllStatic class (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Strictly disable instantiation of AllStatic class Created 4 years, 6 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 | « no previous file | src/allocation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/allocation.h
diff --git a/src/allocation.h b/src/allocation.h
index 7c1e023b8646f8a258d715bbedb70ddd31f8e844..8581cc9e9d75679aaaa78e43eecba859aa5eaf86 100644
--- a/src/allocation.h
+++ b/src/allocation.h
@@ -45,12 +45,12 @@ class Embedded {
#endif
-// Superclass for classes only using statics.
+// Superclass for classes only using static method functions.
+// The subclass of AllStatic cannot be instantiated at all.
class AllStatic {
#ifdef DEBUG
public:
- void* operator new(size_t size);
- void operator delete(void* p);
+ AllStatic() = delete;
#endif
};
« no previous file with comments | « no previous file | src/allocation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698