Commit 21c72450 authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

[DevTools] Make V8's ProtocolMessage a std::vector<uint8_t> for now.

Also we're not creating these any more via StringUtil in blink,
so these two helpers can go.

Change-Id: Ifdf700171ebc46cfbd6ce0af9a6f6ba73419a5a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1887689
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64626}
parent bfe3d6bc
...@@ -125,20 +125,6 @@ std::unique_ptr<protocol::Value> StringUtil::parseJSON(const String16& string) { ...@@ -125,20 +125,6 @@ std::unique_ptr<protocol::Value> StringUtil::parseJSON(const String16& string) {
static_cast<int>(string.length())); static_cast<int>(string.length()));
} }
// static
ProtocolMessage StringUtil::jsonToMessage(String message) {
ProtocolMessage result;
result.json = std::move(message);
return result;
}
// static
ProtocolMessage StringUtil::binaryToMessage(std::vector<uint8_t> message) {
ProtocolMessage result;
result.binary = std::move(message);
return result;
}
// static // static
void StringUtil::builderAppendQuotedString(StringBuilder& builder, void StringUtil::builderAppendQuotedString(StringBuilder& builder,
const String& str) { const String& str) {
......
...@@ -22,10 +22,7 @@ class Value; ...@@ -22,10 +22,7 @@ class Value;
using String = v8_inspector::String16; using String = v8_inspector::String16;
using StringBuilder = v8_inspector::String16Builder; using StringBuilder = v8_inspector::String16Builder;
struct ProtocolMessage { using ProtocolMessage = std::vector<uint8_t>;
String json;
std::vector<uint8_t> binary;
};
class StringUtil { class StringUtil {
public: public:
...@@ -72,8 +69,6 @@ class StringUtil { ...@@ -72,8 +69,6 @@ class StringUtil {
} }
static std::unique_ptr<protocol::Value> parseJSON(const String16& json); static std::unique_ptr<protocol::Value> parseJSON(const String16& json);
static std::unique_ptr<protocol::Value> parseJSON(const StringView& json); static std::unique_ptr<protocol::Value> parseJSON(const StringView& json);
static ProtocolMessage jsonToMessage(String message);
static ProtocolMessage binaryToMessage(std::vector<uint8_t> message);
static String fromUTF8(const uint8_t* data, size_t length) { static String fromUTF8(const uint8_t* data, size_t length) {
return String16::fromUTF8(reinterpret_cast<const char*>(data), length); return String16::fromUTF8(reinterpret_cast<const char*>(data), length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment