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

Unified Diff: Source/core/dom/WeakIdentifierMap.h

Issue 1304043002: Make classes and structures in core/dom fast-allocated. (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
« no previous file with comments | « Source/core/dom/ViewportDescription.h ('k') | Source/core/dom/custom/CustomElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/WeakIdentifierMap.h
diff --git a/Source/core/dom/WeakIdentifierMap.h b/Source/core/dom/WeakIdentifierMap.h
index 33b553407c353f80367d1864b23b04492c6a970d..9f6eb384c2171eb56f5ce751060de91061cd2e41 100644
--- a/Source/core/dom/WeakIdentifierMap.h
+++ b/Source/core/dom/WeakIdentifierMap.h
@@ -6,6 +6,7 @@
#define WeakIdentifierMap_h
#include "platform/heap/Handle.h"
+#include "wtf/Allocator.h"
#include "wtf/HashMap.h"
#include "wtf/Vector.h"
@@ -14,6 +15,7 @@ namespace blink {
template<typename T> struct IdentifierGenerator;
template<> struct IdentifierGenerator<int> {
+ STATIC_ONLY(IdentifierGenerator);
using IdentifierType = int;
static IdentifierType next()
{
@@ -23,6 +25,7 @@ template<> struct IdentifierGenerator<int> {
};
template<typename T> struct WeakIdentifierMapTraits {
+ STATIC_ONLY(WeakIdentifierMapTraits);
static void removedFromIdentifierMap(T*) { }
static void addedToIdentifierMap(T*) { }
};
@@ -33,6 +36,7 @@ template<typename T,
bool isGarbageCollected = IsGarbageCollectedType<T>::value> class WeakIdentifierMap;
template<typename T, typename Generator, typename Traits> class WeakIdentifierMap<T, Generator, Traits, false> {
+ WTF_MAKE_FAST_ALLOCATED(WeakIdentifierMap);
public:
using IdentifierType = typename Generator::IdentifierType;
using ReferenceType = RawPtr<WeakIdentifierMap<T, Generator, Traits, false>>;
« no previous file with comments | « Source/core/dom/ViewportDescription.h ('k') | Source/core/dom/custom/CustomElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698