diff options
Diffstat (limited to 'Source/WTF/wtf/text/StringOperators.h')
-rw-r--r-- | Source/WTF/wtf/text/StringOperators.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/WTF/wtf/text/StringOperators.h b/Source/WTF/wtf/text/StringOperators.h index cfd2f6d6c..5a2435658 100644 --- a/Source/WTF/wtf/text/StringOperators.h +++ b/Source/WTF/wtf/text/StringOperators.h @@ -35,10 +35,10 @@ public: operator String() const { - RefPtr<StringImpl> resultImpl = tryMakeString(m_string1, m_string2); - if (!resultImpl) + String result = tryMakeString(m_string1, m_string2); + if (!result) CRASH(); - return resultImpl.release(); + return result; } operator AtomicString() const @@ -97,6 +97,8 @@ public: void writeTo(LChar* destination) { m_buffer.writeTo(destination); } void writeTo(UChar* destination) { m_buffer.writeTo(destination); } + String toString() const { return m_buffer; } + private: StringAppend<StringType1, StringType2>& m_buffer; }; |