Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1183)

Unified Diff: Source/core/html/parser/HTMLIdentifier.cpp

Issue 110843004: Replaced HTMLIdentifier with an atomized string factory function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/parser/HTMLIdentifier.cpp
diff --git a/Source/core/html/parser/HTMLIdentifier.cpp b/Source/core/html/parser/HTMLIdentifier.cpp
index 9b91cfc276723168b5271ea677a92bed365baee5..f468aa4a45571a809f2c236ebbc58102b76c70ac 100644
--- a/Source/core/html/parser/HTMLIdentifier.cpp
+++ b/Source/core/html/parser/HTMLIdentifier.cpp
@@ -46,14 +46,6 @@ static IdentifierTable& identifierTable()
return table;
}
-#ifndef NDEBUG
-bool HTMLIdentifier::isKnown(const StringImpl* string)
-{
- const IdentifierTable& table = identifierTable();
- return table.contains(string->hash());
-}
-#endif
-
StringImpl* HTMLIdentifier::findIfKnown(const UChar* characters, unsigned length)
{
// We don't need to try hashing if we know the string is too long.
@@ -76,22 +68,12 @@ StringImpl* HTMLIdentifier::findIfKnown(const UChar* characters, unsigned length
return it->value;
}
-const String& HTMLIdentifier::asString() const
-{
- ASSERT(isMainThread());
- return m_string;
-}
-
-const StringImpl* HTMLIdentifier::asStringImpl() const
-{
- return m_string.impl();
-}
-
void HTMLIdentifier::addNames(const QualifiedName* const* names, unsigned namesCount)
{
IdentifierTable& table = identifierTable();
for (unsigned i = 0; i < namesCount; ++i) {
StringImpl* name = names[i]->localName().impl();
+ ASSERT(name->isStatic());
unsigned hash = name->hash();
IdentifierTable::AddResult addResult = table.add(hash, name);
maxNameLength = std::max(maxNameLength, name->length());

Powered by Google App Engine
This is Rietveld 408576698