Index: Source/core/html/parser/HTMLIdentifier.h |
diff --git a/Source/core/html/parser/HTMLIdentifier.h b/Source/core/html/parser/HTMLIdentifier.h |
index 003401314234ae5f0dfa3c35500594457900f15d..eda25ad8c5a907a3c4b18c69438d4308ff3fd058 100644 |
--- a/Source/core/html/parser/HTMLIdentifier.h |
+++ b/Source/core/html/parser/HTMLIdentifier.h |
@@ -40,34 +40,25 @@ enum CharacterWidth { |
class HTMLIdentifier { |
public: |
- HTMLIdentifier() { } |
template<size_t inlineCapacity> |
- HTMLIdentifier(const Vector<UChar, inlineCapacity>& vector, CharacterWidth width) |
- : m_string(findIfKnown(vector.data(), vector.size())) |
+ static String create(const Vector<UChar, inlineCapacity>& vector, CharacterWidth width) |
{ |
- if (m_string.impl()) |
- return; |
+ String string(findIfKnown(vector.data(), vector.size())); |
+ if (string.impl()) |
+ return string; |
if (width == Likely8Bit) |
- m_string = StringImpl::create8BitIfPossible(vector); |
+ string = StringImpl::create8BitIfPossible(vector); |
else if (width == Force8Bit) |
- m_string = String::make8BitFrom16BitSource(vector); |
+ string = String::make8BitFrom16BitSource(vector); |
else |
- m_string = String(vector); |
- } |
+ string = String(vector); |
- // asString should only be used on the main thread. |
- const String& asString() const; |
- // asStringImpl() is safe to call from any thread. |
- const StringImpl* asStringImpl() const; |
+ return string; |
+ } |
abarth-chromium
2013/12/10 01:22:52
It seems like we don't need this class anymore. W
|
static void init(); |
- bool isSafeToSendToAnotherThread() const { return m_string.isSafeToSendToAnotherThread(); } |
- |
-#ifndef NDEBUG |
- static bool isKnown(const StringImpl*); |
-#endif |
private: |
static unsigned maxNameLength; |