| Index: third_party/WebKit/Source/core/inspector/V8InspectorString.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/V8InspectorString.cpp b/third_party/WebKit/Source/core/inspector/V8InspectorString.cpp
|
| index 61274ea2a593f458d56366e8eecea678b43e4f89..4634908419c4d9cad0f7de9bc3c01884f376c71d 100644
|
| --- a/third_party/WebKit/Source/core/inspector/V8InspectorString.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/V8InspectorString.cpp
|
| @@ -41,14 +41,18 @@ String toCoreString(std::unique_ptr<v8_inspector::StringBuffer> buffer) {
|
|
|
| namespace protocol {
|
|
|
| -std::unique_ptr<protocol::Value> parseJSON(const String& string) {
|
| +// static
|
| +std::unique_ptr<protocol::Value> StringUtil::parseJSON(const String& string) {
|
| if (string.isNull())
|
| return nullptr;
|
| - if (string.is8Bit())
|
| - return parseJSON(reinterpret_cast<const uint8_t*>(string.characters8()),
|
| - string.length());
|
| - return parseJSON(reinterpret_cast<const uint16_t*>(string.characters16()),
|
| - string.length());
|
| + if (string.is8Bit()) {
|
| + return parseJSONCharacters(
|
| + reinterpret_cast<const uint8_t*>(string.characters8()),
|
| + string.length());
|
| + }
|
| + return parseJSONCharacters(
|
| + reinterpret_cast<const uint16_t*>(string.characters16()),
|
| + string.length());
|
| }
|
|
|
| } // namespace protocol
|
|
|