Commit 1cb390b8 authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

[DevTools] Roll inspector_protocol to a7423d8ca937e658ab3b85e3b02676bced145ba6.

Change-Id: I270de4fa2970c9e33600453aaecc1c786701dcc3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1521326Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60225}
parent d6c56745
...@@ -2,7 +2,7 @@ Name: inspector protocol ...@@ -2,7 +2,7 @@ Name: inspector protocol
Short Name: inspector_protocol Short Name: inspector_protocol
URL: https://chromium.googlesource.com/deps/inspector_protocol/ URL: https://chromium.googlesource.com/deps/inspector_protocol/
Version: 0 Version: 0
Revision: b13e24ccee66d7e0590ce1266db9c906e3648561 Revision: a7423d8ca937e658ab3b85e3b02676bced145ba6
License: BSD License: BSD
License File: LICENSE License File: LICENSE
Security Critical: no Security Critical: no
......
...@@ -632,7 +632,7 @@ def main(): ...@@ -632,7 +632,7 @@ def main():
"Array_h.template", "Array_h.template",
"DispatcherBase_h.template", "DispatcherBase_h.template",
"Parser_h.template", "Parser_h.template",
"CBOR_h.template", "encoding_h.template",
] ]
protocol_cpp_templates = [ protocol_cpp_templates = [
...@@ -642,7 +642,7 @@ def main(): ...@@ -642,7 +642,7 @@ def main():
"Object_cpp.template", "Object_cpp.template",
"DispatcherBase_cpp.template", "DispatcherBase_cpp.template",
"Parser_cpp.template", "Parser_cpp.template",
"CBOR_cpp.template", "encoding_cpp.template",
] ]
forward_h_templates = [ forward_h_templates = [
......
...@@ -33,10 +33,10 @@ template("inspector_protocol_generate") { ...@@ -33,10 +33,10 @@ template("inspector_protocol_generate") {
invoker.config_file, invoker.config_file,
"$inspector_protocol_dir/lib/base_string_adapter_cc.template", "$inspector_protocol_dir/lib/base_string_adapter_cc.template",
"$inspector_protocol_dir/lib/base_string_adapter_h.template", "$inspector_protocol_dir/lib/base_string_adapter_h.template",
"$inspector_protocol_dir/lib/encoding_h.template",
"$inspector_protocol_dir/lib/encoding_cpp.template",
"$inspector_protocol_dir/lib/Allocator_h.template", "$inspector_protocol_dir/lib/Allocator_h.template",
"$inspector_protocol_dir/lib/Array_h.template", "$inspector_protocol_dir/lib/Array_h.template",
"$inspector_protocol_dir/lib/CBOR_h.template",
"$inspector_protocol_dir/lib/CBOR_cpp.template",
"$inspector_protocol_dir/lib/DispatcherBase_cpp.template", "$inspector_protocol_dir/lib/DispatcherBase_cpp.template",
"$inspector_protocol_dir/lib/DispatcherBase_h.template", "$inspector_protocol_dir/lib/DispatcherBase_h.template",
"$inspector_protocol_dir/lib/ErrorSupport_cpp.template", "$inspector_protocol_dir/lib/ErrorSupport_cpp.template",
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
{ {
'variables': { 'variables': {
'inspector_protocol_files': [ 'inspector_protocol_files': [
'lib/encoding_h.template',
'lib/encoding_cpp.template',
'lib/Allocator_h.template', 'lib/Allocator_h.template',
'lib/Array_h.template', 'lib/Array_h.template',
'lib/CBOR_h.template',
'lib/CBOR_cpp.template',
'lib/DispatcherBase_cpp.template', 'lib/DispatcherBase_cpp.template',
'lib/DispatcherBase_h.template', 'lib/DispatcherBase_h.template',
'lib/ErrorSupport_cpp.template', 'lib/ErrorSupport_cpp.template',
......
...@@ -256,34 +256,34 @@ bool AppendStringValueToMapBinary(base::StringPiece in, ...@@ -256,34 +256,34 @@ bool AppendStringValueToMapBinary(base::StringPiece in,
if (in.size() < 1 + 1 + 4 + 1 + 1) if (in.size() < 1 + 1 + 4 + 1 + 1)
return false; return false;
const uint8_t* envelope = reinterpret_cast<const uint8_t*>(in.data()); const uint8_t* envelope = reinterpret_cast<const uint8_t*>(in.data());
if (cbor::kInitialByteForEnvelope != envelope[0]) if (cbor::InitialByteForEnvelope() != envelope[0])
return false; return false;
if (cbor::kInitialByteFor32BitLengthByteString != envelope[1]) if (cbor::InitialByteFor32BitLengthByteString() != envelope[1])
return false; return false;
if (cbor::kInitialByteIndefiniteLengthMap != envelope[6]) if (cbor::EncodeIndefiniteLengthMapStart() != envelope[6])
return false; return false;
uint32_t envelope_size = ReadEnvelopeSize(envelope + 2); uint32_t envelope_size = ReadEnvelopeSize(envelope + 2);
if (envelope_size + 2 + 4 != in.size()) if (envelope_size + 2 + 4 != in.size())
return false; return false;
if (cbor::kStopByte != static_cast<uint8_t>(*in.rbegin())) if (cbor::EncodeStop() != static_cast<uint8_t>(*in.rbegin()))
return false; return false;
std::vector<uint8_t> encoded_entry; std::vector<uint8_t> encoded_entry;
encoded_entry.reserve(1 + 4 + key.size() + 1 + 4 + value.size()); encoded_entry.reserve(1 + 4 + key.size() + 1 + 4 + value.size());
span<uint8_t> key_span( span<uint8_t> key_span(
reinterpret_cast<const uint8_t*>(key.data()), key.size()); reinterpret_cast<const uint8_t*>(key.data()), key.size());
EncodeString8(key_span, &encoded_entry); cbor::EncodeString8(key_span, &encoded_entry);
span<uint8_t> value_span( span<uint8_t> value_span(
reinterpret_cast<const uint8_t*>(value.data()), value.size()); reinterpret_cast<const uint8_t*>(value.data()), value.size());
EncodeString8(value_span, &encoded_entry); cbor::EncodeString8(value_span, &encoded_entry);
out->clear(); out->clear();
out->reserve(in.size() + encoded_entry.size()); out->reserve(in.size() + encoded_entry.size());
out->append(in.begin(), in.end() - 1); out->append(in.begin(), in.end() - 1);
out->append(reinterpret_cast<const char*>(encoded_entry.data()), out->append(reinterpret_cast<const char*>(encoded_entry.data()),
encoded_entry.size()); encoded_entry.size());
out->append(1, static_cast<char>(cbor::kStopByte)); out->append(1, static_cast<char>(cbor::EncodeStop()));
std::size_t new_size = envelope_size + out->size() - in.size(); std::size_t new_size = envelope_size + out->size() - in.size();
if (new_size > static_cast<std::size_t>( if (new_size > static_cast<std::size_t>(
std::numeric_limits<uint32_t>::max())) { std::numeric_limits<uint32_t>::max())) {
......
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