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

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

Issue 110843004: Replaced HTMLIdentifier with an atomized string factory function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes 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/HTMLPreloadScanner.cpp
diff --git a/Source/core/html/parser/HTMLPreloadScanner.cpp b/Source/core/html/parser/HTMLPreloadScanner.cpp
index b925f1b81ec4afcdbd7d484a27fa7e7cf0d96c76..0d1e0645ad7e784044a2619a364dd679a915d159 100644
--- a/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -47,17 +47,17 @@ static bool match(const StringImpl* impl, const QualifiedName& qName)
return impl == qName.localName().impl();
}
-static bool match(const HTMLIdentifier& name, const QualifiedName& qName)
-{
- return match(name.asStringImpl(), qName);
-}
-
static bool match(const AtomicString& name, const QualifiedName& qName)
{
ASSERT(isMainThread());
return qName.localName() == name;
}
+static bool match(const String& name, const QualifiedName& qName)
+{
+ return threadSafeMatch(name, qName);
+}
+
static const StringImpl* tagImplFor(const HTMLToken::DataVector& data)
{
AtomicString tagName(data);
@@ -67,9 +67,9 @@ static const StringImpl* tagImplFor(const HTMLToken::DataVector& data)
return 0;
}
-static const StringImpl* tagImplFor(const HTMLIdentifier& tagName)
+static const StringImpl* tagImplFor(const String& tagName)
{
- const StringImpl* result = tagName.asStringImpl();
+ const StringImpl* result = tagName.impl();
if (result->isStatic())
return result;
return 0;

Powered by Google App Engine
This is Rietveld 408576698