Changeset 140485 in webkit
- Timestamp:
- Jan 22, 2013 4:06:35 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140484 r140485 1 2013-01-22 Tony Gentilcore <tonyg@chromium.org> 2 3 Fix assertions in make8BitFrom16BitSource() with threaded parser 4 https://bugs.webkit.org/show_bug.cgi?id=107596 5 6 Reviewed by Adam Barth. 7 8 This fixes an assertion in several fast/parser tests. We need to keep track of whether the data is all 8bit. 9 Luckily this doesn't cost us any size on CompactHTMLToken because the bitfields are collapsed (verified by COMPILE_ASSERT). 10 11 No new tests because covered by existing fast/parser tests. 12 13 * html/parser/CompactHTMLToken.cpp: 14 (WebCore::CompactHTMLToken::CompactHTMLToken): 15 * html/parser/CompactHTMLToken.h: 16 (WebCore::CompactHTMLToken::isAll8BitData): 17 (CompactHTMLToken): 18 * html/parser/HTMLToken.h: 19 (WebCore::AtomicHTMLToken::AtomicHTMLToken): 20 1 21 2013-01-22 Tony Gentilcore <tonyg@chromium.org> 2 22 -
trunk/Source/WebCore/html/parser/CompactHTMLToken.cpp
r140467 r140485 45 45 CompactHTMLToken::CompactHTMLToken(const HTMLToken& token, const TextPosition& textPosition) 46 46 : m_type(token.type()) 47 , m_isAll8BitData(false) 47 48 , m_textPosition(textPosition) 48 49 { … … 72 73 case HTMLTokenTypes::Comment: 73 74 case HTMLTokenTypes::Character: 74 if (token.isAll8BitData()) 75 if (token.isAll8BitData()) { 75 76 m_data = String::make8BitFrom16BitSource(token.data().data(), token.data().size()); 76 else 77 m_isAll8BitData = true; 78 } else 77 79 m_data = String(token.data().data(), token.data().size()); 78 80 break; -
trunk/Source/WebCore/html/parser/CompactHTMLToken.h
r140478 r140485 65 65 const String& data() const { return m_data; } 66 66 bool selfClosing() const { return m_selfClosing; } 67 bool isAll8BitData() const { return m_isAll8BitData; } 67 68 const Vector<CompactAttribute>& attributes() const { return m_attributes; } 68 69 const TextPosition& textPosition() const { return m_textPosition; } … … 76 77 unsigned m_type : 4; 77 78 unsigned m_selfClosing : 1; 79 unsigned m_isAll8BitData : 1; 78 80 79 81 String m_data; // "name", "characters", or "data" depending on m_type -
trunk/Source/WebCore/html/parser/HTMLToken.h
r140403 r140485 243 243 m_externalCharacters = token.data().characters(); 244 244 m_externalCharactersLength = token.data().length(); 245 m_isAll8BitData = token.isAll8BitData(); 245 246 break; 246 247 default:
Note: See TracChangeset
for help on using the changeset viewer.