OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WeakIdentifierMap_h | 5 #ifndef WeakIdentifierMap_h |
6 #define WeakIdentifierMap_h | 6 #define WeakIdentifierMap_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 extern template class WeakIdentifierMap<T, ##__VA_ARGS__>; | 147 extern template class WeakIdentifierMap<T, ##__VA_ARGS__>; |
148 | 148 |
149 #define DEFINE_WEAK_IDENTIFIER_MAP(T, ...) \ | 149 #define DEFINE_WEAK_IDENTIFIER_MAP(T, ...) \ |
150 template class WeakIdentifierMap<T, ##__VA_ARGS__>; \ | 150 template class WeakIdentifierMap<T, ##__VA_ARGS__>; \ |
151 template<> WeakIdentifierMap<T, ##__VA_ARGS__>& WeakIdentifierMap<T, ##__VA_
ARGS__>::instance() \ | 151 template<> WeakIdentifierMap<T, ##__VA_ARGS__>& WeakIdentifierMap<T, ##__VA_
ARGS__>::instance() \ |
152 { \ | 152 { \ |
153 using RefType = WeakIdentifierMap<T, ##__VA_ARGS__>::ReferenceType; \ | 153 using RefType = WeakIdentifierMap<T, ##__VA_ARGS__>::ReferenceType; \ |
154 DEFINE_STATIC_LOCAL(RefType, mapInstance, (new WeakIdentifierMap<T, ##__
VA_ARGS__>())); \ | 154 DEFINE_STATIC_LOCAL(RefType, mapInstance, (new WeakIdentifierMap<T, ##__
VA_ARGS__>())); \ |
155 return *mapInstance; \ | 155 return *mapInstance; \ |
156 } | 156 } |
157 } | 157 } // namespace blink |
158 | 158 |
159 #endif // WeakIdentifierMap_h | 159 #endif // WeakIdentifierMap_h |
OLD | NEW |