| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_INSPECTOR_STRINGUTIL_H_ | 5 #ifndef V8_INSPECTOR_STRINGUTIL_H_ |
| 6 #define V8_INSPECTOR_STRINGUTIL_H_ | 6 #define V8_INSPECTOR_STRINGUTIL_H_ |
| 7 | 7 |
| 8 #include "src/inspector/Allocator.h" | 8 #include "src/inspector/Allocator.h" |
| 9 #include "src/inspector/String16.h" | 9 #include "src/inspector/String16.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 static void builderReserve(StringBuilder& builder, unsigned capacity) { | 30 static void builderReserve(StringBuilder& builder, unsigned capacity) { |
| 31 builder.reserveCapacity(capacity); | 31 builder.reserveCapacity(capacity); |
| 32 } | 32 } |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 std::unique_ptr<protocol::Value> parseJSON(const StringView& json); | 35 std::unique_ptr<protocol::Value> parseJSON(const StringView& json); |
| 36 std::unique_ptr<protocol::Value> parseJSON(const String16& json); | 36 std::unique_ptr<protocol::Value> parseJSON(const String16& json); |
| 37 | 37 |
| 38 } // namespace protocol | 38 } // namespace protocol |
| 39 | 39 |
| 40 std::unique_ptr<protocol::Value> toProtocolValue(v8::Local<v8::Context>, | 40 std::unique_ptr<protocol::Value> toProtocolValue(protocol::String* errorString, |
| 41 v8::Local<v8::Context>, |
| 41 v8::Local<v8::Value>, | 42 v8::Local<v8::Value>, |
| 42 int maxDepth = 1000); | 43 int maxDepth = 1000); |
| 43 | 44 |
| 44 v8::Local<v8::String> toV8String(v8::Isolate*, const String16&); | 45 v8::Local<v8::String> toV8String(v8::Isolate*, const String16&); |
| 45 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const String16&); | 46 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const String16&); |
| 46 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const char*); | 47 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const char*); |
| 47 v8::Local<v8::String> toV8String(v8::Isolate*, const StringView&); | 48 v8::Local<v8::String> toV8String(v8::Isolate*, const StringView&); |
| 48 // TODO(dgozman): rename to toString16. | 49 // TODO(dgozman): rename to toString16. |
| 49 String16 toProtocolString(v8::Local<v8::String>); | 50 String16 toProtocolString(v8::Local<v8::String>); |
| 50 String16 toProtocolStringWithTypeCheck(v8::Local<v8::Value>); | 51 String16 toProtocolStringWithTypeCheck(v8::Local<v8::Value>); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 explicit StringBufferImpl(String16&); | 65 explicit StringBufferImpl(String16&); |
| 65 String16 m_owner; | 66 String16 m_owner; |
| 66 StringView m_string; | 67 StringView m_string; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 } // namespace v8_inspector | 70 } // namespace v8_inspector |
| 70 | 71 |
| 71 #endif // V8_INSPECTOR_STRINGUTIL_H_ | 72 #endif // V8_INSPECTOR_STRINGUTIL_H_ |
| OLD | NEW |