Changeset 284456 in webkit
- Timestamp:
- Oct 19, 2021 9:00:19 AM (3 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r284439 r284456 1 2021-10-18 Filip Pizlo <fpizlo@apple.com> 2 3 StringBuffer should really know that strings might be 8-bit 4 https://bugs.webkit.org/show_bug.cgi?id=231937 5 6 Reviewed by Yusuke Suzuki. 7 8 We somehow forgot to change this to use CharType instead of UChar. 9 10 * wtf/text/StringBuffer.h: 11 (WTF::StringBuffer::resize): 12 1 13 2021-10-19 Cameron McCormack <heycam@apple.com> 2 14 -
trunk/Source/WTF/wtf/text/StringBuffer.h
r278338 r284456 64 64 void resize(unsigned newLength) 65 65 { 66 if (newLength > m_length) { 67 if (newLength > std::numeric_limits<unsigned>::max() / sizeof(UChar)) 68 CRASH(); 69 m_data = static_cast<UChar*>(StringBufferMalloc::realloc(m_data, newLength * sizeof(UChar))); 70 } 66 if (newLength > m_length) 67 m_data = static_cast<CharType*>(StringBufferMalloc::realloc(m_data, Checked<size_t>(newLength) * sizeof(CharType))); 71 68 m_length = newLength; 72 69 }
Note: See TracChangeset
for help on using the changeset viewer.