Changeset 115545 in webkit for trunk/Source/JavaScriptCore/runtime/WeakGCMap.h
- Timestamp:
- Apr 27, 2012, 10:57:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/WeakGCMap.h
r113508 r115545 118 118 } 119 119 120 AddResult add(JSGlobalData& globalData, const KeyType& key, ExternalType value)120 AddResult add(JSGlobalData&, const KeyType& key, ExternalType value) 121 121 { 122 122 typename MapType::AddResult result = m_map.add(key, 0); 123 123 if (result.isNewEntry) 124 result.iterator->second = globalData.heap.weakSet()->allocate(value, this, FinalizerCallback::finalizerContextFor(key));124 result.iterator->second = WeakSet::allocate(value, this, FinalizerCallback::finalizerContextFor(key)); 125 125 126 126 // WeakGCMap exposes a different iterator, so we need to wrap it and create our own AddResult. … … 128 128 } 129 129 130 void set(JSGlobalData& globalData, const KeyType& key, ExternalType value)130 void set(JSGlobalData&, const KeyType& key, ExternalType value) 131 131 { 132 132 typename MapType::AddResult result = m_map.add(key, 0); 133 133 if (!result.isNewEntry) 134 134 WeakSet::deallocate(result.iterator->second); 135 result.iterator->second = globalData.heap.weakSet()->allocate(value, this, FinalizerCallback::finalizerContextFor(key));135 result.iterator->second = WeakSet::allocate(value, this, FinalizerCallback::finalizerContextFor(key)); 136 136 } 137 137
Note:
See TracChangeset
for help on using the changeset viewer.