Changeset 14221 in webkit for trunk/JavaScriptCore
- Timestamp:
- May 7, 2006, 9:59:28 PM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r14206 r14221 1 2006-05-06 Darin Adler <[email protected]> 2 3 Reviewed and landed by Maciej. 4 5 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8765 6 Random crashes on TOT since the form state change 7 8 I haven't figured out how to construct a test for this, but this does seem to fix the 9 problem; Mitz mentioned that a double-destroy was occurring in these functions. 10 11 * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use RefCounter::deref instead of calling 12 ~ValueType, because ~ValueType often results in a double-destroy, since the HashTable also 13 destroys the element based on the storage type. The RefCounter template correctly does work 14 only in cases where ValueType and ValueStorageType differe and this class is what's used 15 elsewhere for the same purpose; I somehow missed this case when optimizing HashMap. 16 * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto. 17 1 18 2006-05-05 Darin Adler <[email protected]> 2 19 -
trunk/JavaScriptCore/kxmlcore/HashMap.h
r14156 r14221 289 289 if (it.m_impl == m_impl.end()) 290 290 return; 291 // Use "(*it)." instead of "it->" to work around a problem seen with the Visual C++ compiler. 292 (*it).~ValueType(); 291 RefCounter<ValueTraits, ValueStorageTraits>::deref(*it.m_impl); 293 292 m_impl.remove(it.m_impl); 294 293 } -
trunk/JavaScriptCore/kxmlcore/HashSet.h
r13830 r14221 275 275 if (it.m_impl == m_impl.end()) 276 276 return; 277 // Use "(*it)." instead of "it->" to work around a problem seen with the Visual C++ compiler. 278 (*it).~ValueType(); 277 RefCounter<ValueTraits, StorageTraits>::deref(*it.m_impl); 279 278 m_impl.remove(it.m_impl); 280 279 }
Note:
See TracChangeset
for help on using the changeset viewer.