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(protocol::String* errorString, | 40 std::unique_ptr<protocol::Value> toProtocolValue(v8::Local<v8::Context>, |
41 v8::Local<v8::Context>, | |
42 v8::Local<v8::Value>, | 41 v8::Local<v8::Value>, |
43 int maxDepth = 1000); | 42 int maxDepth = 1000); |
44 | 43 |
45 v8::Local<v8::String> toV8String(v8::Isolate*, const String16&); | 44 v8::Local<v8::String> toV8String(v8::Isolate*, const String16&); |
46 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const String16&); | 45 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const String16&); |
47 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const char*); | 46 v8::Local<v8::String> toV8StringInternalized(v8::Isolate*, const char*); |
48 v8::Local<v8::String> toV8String(v8::Isolate*, const StringView&); | 47 v8::Local<v8::String> toV8String(v8::Isolate*, const StringView&); |
49 // TODO(dgozman): rename to toString16. | 48 // TODO(dgozman): rename to toString16. |
50 String16 toProtocolString(v8::Local<v8::String>); | 49 String16 toProtocolString(v8::Local<v8::String>); |
51 String16 toProtocolStringWithTypeCheck(v8::Local<v8::Value>); | 50 String16 toProtocolStringWithTypeCheck(v8::Local<v8::Value>); |
(...skipping 11 matching lines...) Expand all Loading... |
63 | 62 |
64 private: | 63 private: |
65 explicit StringBufferImpl(String16&); | 64 explicit StringBufferImpl(String16&); |
66 String16 m_owner; | 65 String16 m_owner; |
67 StringView m_string; | 66 StringView m_string; |
68 }; | 67 }; |
69 | 68 |
70 } // namespace v8_inspector | 69 } // namespace v8_inspector |
71 | 70 |
72 #endif // V8_INSPECTOR_STRINGUTIL_H_ | 71 #endif // V8_INSPECTOR_STRINGUTIL_H_ |
OLD | NEW |