Changeset 119341 in webkit for trunk/Source/JavaScriptCore/heap/Weak.h
- Timestamp:
- Jun 2, 2012, 3:49:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/Weak.h
r118483 r119341 154 154 // This function helps avoid modifying a weak table while holding an iterator into it. (Object allocation 155 155 // can run a finalizer that modifies the table. We avoid that by requiring a pre-constructed object as our value.) 156 template<typename T, typename U> inline void weakAdd(HashMap<T, Weak<U> >& map, const T& key, PassWeak<U>value)156 template<typename Map, typename Key, typename Value> inline void weakAdd(Map& map, const Key& key, Value value) 157 157 { 158 158 ASSERT(!map.get(key)); … … 160 160 } 161 161 162 template<typename T, typename U> inline void weakRemove(HashMap<T, Weak<U> >& map, const T& key, typename Weak<U>::GetType value)163 { 164 typename HashMap<T, Weak<U> >::iterator it = map.find(key);162 template<typename Map, typename Key, typename Value> inline void weakRemove(Map& map, const Key& key, Value value) 163 { 164 typename Map::iterator it = map.find(key); 165 165 ASSERT_UNUSED(value, value); 166 166 ASSERT(it != map.end());
Note:
See TracChangeset
for help on using the changeset viewer.