Index: Source/core/html/parser/CompactHTMLToken.cpp |
diff --git a/Source/core/html/parser/CompactHTMLToken.cpp b/Source/core/html/parser/CompactHTMLToken.cpp |
index fd4026bf0409ff3ae02142616dd968e5d1c395b0..4a826e839b3d5c2081f7e010868cb2bd76d510a9 100644 |
--- a/Source/core/html/parser/CompactHTMLToken.cpp |
+++ b/Source/core/html/parser/CompactHTMLToken.cpp |
@@ -33,7 +33,7 @@ namespace WebCore { |
struct SameSizeAsCompactHTMLToken { |
unsigned bitfields; |
- HTMLIdentifier data; |
+ String data; |
Vector<Attribute> vector; |
TextPosition textPosition; |
}; |
@@ -51,10 +51,11 @@ CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t |
ASSERT_NOT_REACHED(); |
break; |
case HTMLToken::DOCTYPE: { |
- m_data = HTMLIdentifier(token->name(), Likely8Bit); |
+ m_data = attemptStaticStringCreation(token->name(), Likely8Bit); |
+ |
// There is only 1 DOCTYPE token per document, so to avoid increasing the |
// size of CompactHTMLToken, we just use the m_attributes vector. |
- m_attributes.append(Attribute(HTMLIdentifier(token->publicIdentifier(), Likely8Bit), String(token->systemIdentifier()))); |
+ m_attributes.append(Attribute(attemptStaticStringCreation(token->publicIdentifier(), Likely8Bit), String(token->systemIdentifier()))); |
m_doctypeForcesQuirks = token->forceQuirks(); |
break; |
} |
@@ -63,7 +64,7 @@ CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t |
case HTMLToken::StartTag: |
m_attributes.reserveInitialCapacity(token->attributes().size()); |
for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes().begin(); it != token->attributes().end(); ++it) |
- m_attributes.append(Attribute(HTMLIdentifier(it->name, Likely8Bit), StringImpl::create8BitIfPossible(it->value))); |
+ m_attributes.append(Attribute(attemptStaticStringCreation(it->name, Likely8Bit), StringImpl::create8BitIfPossible(it->value))); |
// Fall through! |
case HTMLToken::EndTag: |
m_selfClosing = token->selfClosing(); |
@@ -71,7 +72,7 @@ CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t |
case HTMLToken::Comment: |
case HTMLToken::Character: { |
m_isAll8BitData = token->isAll8BitData(); |
- m_data = HTMLIdentifier(token->data(), token->isAll8BitData() ? Force8Bit : Force16Bit); |
+ m_data = attemptStaticStringCreation(token->data(), token->isAll8BitData() ? Force8Bit : Force16Bit); |
break; |
} |
default: |