Chromium Code Reviews| Index: Source/WTF/wtf/text/StringImpl.h |
| diff --git a/Source/WTF/wtf/text/StringImpl.h b/Source/WTF/wtf/text/StringImpl.h |
| index 59fc5fd262bdb0ee63cdd9e8dc4c919a17397bb1..cdcfe581f7ab9763cc02829817fcaf6a3a61e984 100644 |
| --- a/Source/WTF/wtf/text/StringImpl.h |
| +++ b/Source/WTF/wtf/text/StringImpl.h |
| @@ -463,13 +463,14 @@ public: |
| bool isAtomic() const { return m_hashAndFlags & s_hashFlagIsAtomic; } |
| void setIsAtomic(bool isAtomic) |
| { |
| - ASSERT(!isStatic()); |
| if (isAtomic) |
| m_hashAndFlags |= s_hashFlagIsAtomic; |
| else |
| m_hashAndFlags &= ~s_hashFlagIsAtomic; |
| } |
| + bool isStatic() const { return m_refCount & s_refCountFlagIsStaticString; } |
| + |
| #ifdef STRING_STATS |
| bool isSubString() const { return bufferOwnership() == BufferSubstring; } |
| #endif |
| @@ -686,7 +687,6 @@ private: |
| static const unsigned s_copyCharsInlineCutOff = 20; |
| BufferOwnership bufferOwnership() const { return static_cast<BufferOwnership>(m_hashAndFlags & s_hashMaskBufferOwnership); } |
| - bool isStatic() const { return m_refCount & s_refCountFlagIsStaticString; } |
| template <class UCharPredicate> PassRefPtr<StringImpl> stripMatchedCharacters(UCharPredicate); |
| template <typename CharType, class UCharPredicate> PassRefPtr<StringImpl> simplifyMatchedCharactersToSpace(UCharPredicate); |
| WTF_EXPORT_STRING_API NEVER_INLINE const UChar* getData16SlowCase() const; |
| @@ -719,12 +719,11 @@ public: |
| unsigned m_refCount; |
| unsigned m_length; |
| const LChar* m_data8; |
| - void* m_buffer; |
| + const UChar* m_copyData16; |
|
eseidel
2013/04/10 20:53:50
I'm confused by the rename.
abarth-chromium
2013/04/10 21:00:51
It's related to the union on line 746. I changed
|
| unsigned m_hashAndFlags; |
| - // These values mimic ConstructFromLiteral. |
| - static const unsigned s_initialRefCount = s_refCountIncrement; |
| - static const unsigned s_initialFlags = s_hashFlag8BitBuffer | BufferInternal | s_hashFlagHasTerminatingNullCharacter; |
| + static const unsigned s_initialRefCount = s_refCountFlagIsStaticString; |
| + static const unsigned s_initialFlags = s_hashFlag8BitBuffer | s_hashFlagHas16BitShadow | BufferInternal | s_hashFlagHasTerminatingNullCharacter; |
| static const unsigned s_hashShift = s_flagCount; |
| }; |