Changeset 240896 in webkit
- Timestamp:
- Feb 2, 2019 10:35:42 AM (5 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r240892 r240896 1 2019-02-02 David Kilzer <ddkilzer@apple.com> 2 3 Leak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple.WebKit.WebContent running layout tests 4 <https://webkit.org/b/193291> 5 <rdar://problem/46655953> 6 7 Reviewed by Keith Miller. 8 9 * wtf/text/SymbolImpl.h: 10 (WTF::SymbolImpl::~SymbolImpl): Fix the leak by implementing the 11 class destructor that calls StringImpl::deref() on `m_owner`. 12 Two of the three constructors leak the StringImpl when setting 13 `m_owner`, so we need to balance that by manually calling 14 deref(). 15 1 16 2018-12-16 Darin Adler <darin@apple.com> 2 17 -
trunk/Source/WTF/wtf/text/SymbolImpl.h
r231337 r240896 117 117 } 118 118 119 ~SymbolImpl() 120 { 121 if (m_owner != StringImpl::empty()) 122 m_owner->deref(); 123 m_owner = nullptr; 124 } 125 119 126 // The pointer to the owner string should be immediately following after the StringImpl layout, 120 127 // since we would like to align the layout of SymbolImpl to the one of BufferSubstring StringImpl.
Note: See TracChangeset
for help on using the changeset viewer.