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

Unified Diff: Source/core/html/HTMLObjectElement.cpp

Issue 51983003: Stop using static arrays for *Tags / *Attrs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve generated code Created 7 years, 2 months 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/HTMLObjectElement.cpp
diff --git a/Source/core/html/HTMLObjectElement.cpp b/Source/core/html/HTMLObjectElement.cpp
index b336370eb2793954efeeb68add51e3a4f5c97b33..d357816ba721ebcc1d070eb8f9ee733a0c79bfbd 100644
--- a/Source/core/html/HTMLObjectElement.cpp
+++ b/Source/core/html/HTMLObjectElement.cpp
@@ -394,8 +394,10 @@ static bool isRecognizedTagName(const QualifiedName& tagName)
{
DEFINE_STATIC_LOCAL(HashSet<StringImpl*>, tagList, ());
if (tagList.isEmpty()) {
- const QualifiedName* const* tags = HTMLNames::getHTMLTags();
- for (size_t i = 0; i < HTMLNames::HTMLTagsCount; i++) {
+ Vector<const QualifiedName*> tags;
+ HTMLNames::getHTMLTags(tags);
+ size_t HTMLTagsCount = tags.size();
+ for (size_t i = 0; i < HTMLTagsCount; ++i) {
if (*tags[i] == bgsoundTag
|| *tags[i] == commandTag
|| *tags[i] == detailsTag

Powered by Google App Engine
This is Rietveld 408576698