| Index: third_party/WebKit/Source/platform/inspector_protocol/String16WTF.cpp
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/String16WTF.cpp b/third_party/WebKit/Source/platform/inspector_protocol/String16WTF.cpp
|
| index 387ecc3f48c45c98d8d89359ac269bbc1738d282..c18c0b65be6ceed642c5abaa78df5c455bac9beb 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/String16WTF.cpp
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/String16WTF.cpp
|
| @@ -17,17 +17,8 @@ String16::String16(const WTF::String& other)
|
| {
|
| if (other.isNull())
|
| return;
|
| - if (!other.is8Bit()) {
|
| - m_impl = other;
|
| - return;
|
| - }
|
| -
|
| - UChar* data;
|
| - const LChar* characters = other.characters8();
|
| - size_t length = other.length();
|
| - m_impl = String::createUninitialized(length, data);
|
| - for (size_t i = 0; i < length; ++i)
|
| - data[i] = characters[i];
|
| + m_impl = other;
|
| + m_impl.ensure16Bit();
|
| }
|
|
|
| String16::String16(const char* characters, size_t length)
|
| @@ -38,10 +29,5 @@ String16::String16(const char* characters, size_t length)
|
| data[i] = characters[i];
|
| }
|
|
|
| -String16 String16::createUninitialized(unsigned length, UChar*& data)
|
| -{
|
| - return String::createUninitialized(length, data);
|
| -}
|
| -
|
| } // namespace protocol
|
| } // namespace blink
|
|
|