Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / wtf / text / StringImpl.h
index 2c35a29..d763219 100644 (file)
@@ -141,6 +141,19 @@ private:
         hash();
     }
 
+    enum ConstructEmptyString16BitTag { ConstructEmptyString16Bit };
+    explicit StringImpl(ConstructEmptyString16BitTag)
+        : m_refCount(1)
+        , m_length(0)
+        , m_hash(0)
+        , m_isAtomic(false)
+        , m_is8Bit(false)
+        , m_isStatic(true)
+    {
+        STRING_STATS_ADD_16BIT_STRING(m_length);
+        hash();
+    }
+
     // FIXME: there has to be a less hacky way to do this.
     enum Force8Bit { Force8BitConstructor };
     StringImpl(unsigned length, Force8Bit)
@@ -291,6 +304,7 @@ public:
     }
 
     static StringImpl* empty();
+    static StringImpl* empty16Bit();
 
     // FIXME: Does this really belong in StringImpl?
     template <typename T> static void copyChars(T* destination, const T* source, unsigned numCharacters)