| 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..4656afacc697518deb05c278940998da8acd1855 100644
|
| --- a/Source/core/html/parser/HTMLIdentifier.cpp
|
| +++ b/Source/core/html/parser/HTMLIdentifier.cpp
|
| @@ -87,10 +87,11 @@ const StringImpl* HTMLIdentifier::asStringImpl() const
|
| return m_string.impl();
|
| }
|
|
|
| -void HTMLIdentifier::addNames(const QualifiedName* const* names, unsigned namesCount)
|
| +void HTMLIdentifier::addNames(const Vector<const QualifiedName*>& names)
|
| {
|
| IdentifierTable& table = identifierTable();
|
| - for (unsigned i = 0; i < namesCount; ++i) {
|
| + size_t namesCount = names.size();
|
| + for (size_t i = 0; i < namesCount; ++i) {
|
| StringImpl* name = names[i]->localName().impl();
|
| unsigned hash = name->hash();
|
| IdentifierTable::AddResult addResult = table.add(hash, name);
|
| @@ -114,8 +115,12 @@ void HTMLIdentifier::init()
|
| isInitialized = true;
|
|
|
| // FIXME: We should atomize small whitespace (\n, \n\n, etc.)
|
| - addNames(getHTMLTags(), HTMLTagsCount);
|
| - addNames(getHTMLAttrs(), HTMLAttrsCount);
|
| + Vector<const QualifiedName*> HTMLTags;
|
| + getHTMLTags(HTMLTags);
|
| + addNames(HTMLTags);
|
| + Vector<const QualifiedName*> HTMLAttrs;
|
| + getHTMLAttrs(HTMLAttrs);
|
| + addNames(HTMLAttrs);
|
| }
|
|
|
| }
|
|
|