[DevTools] Roll inspector_protocol

New Revision: aec57d43b6a2c41c37fb0a2507108e89a9342177

This includes Junliang's fix for big endian.
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1680051

Bug: v8:9355
Change-Id: I21aa77b20bbaa3c897391a85cb1862f943c12e22
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682607
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62480}
This commit is contained in:
Johannes Henkel 2019-06-28 12:52:52 -07:00 committed by Commit Bot
parent 12f4751942
commit 30c1bee848
6 changed files with 11 additions and 35 deletions

View File

@ -2,7 +2,7 @@ Name: inspector protocol
Short Name: inspector_protocol
URL: https://chromium.googlesource.com/deps/inspector_protocol/
Version: 0
Revision: 8b7ea912e516a6daa61487c700687a9426e3a396
Revision: aec57d43b6a2c41c37fb0a2507108e89a9342177
License: BSD
License File: LICENSE
Security Critical: no

View File

@ -65,7 +65,10 @@ def read_config():
cmdline_parser.add_argument("--jinja_dir", type=unicode, required=True)
cmdline_parser.add_argument("--config", type=unicode, required=True)
cmdline_parser.add_argument("--config_value", default=[], action="append")
cmdline_parser.add_argument("--inspector_protocol_dir", type=unicode, required=True)
cmdline_parser.add_argument(
"--inspector_protocol_dir", type=unicode, required=True,
help=("directory with code_generator.py and C++ encoding / binding "
"libraries, relative to the root of the source tree."))
arg_options = cmdline_parser.parse_args()
jinja_dir = arg_options.jinja_dir
output_base = arg_options.output_base

View File

@ -1,29 +0,0 @@
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'inspector_protocol_files': [
'lib/DispatcherBase_cpp.template',
'lib/DispatcherBase_h.template',
'lib/ErrorSupport_cpp.template',
'lib/ErrorSupport_h.template',
'lib/Forward_h.template',
'lib/FrontendChannel_h.template',
'lib/Object_cpp.template',
'lib/Object_h.template',
'lib/Parser_cpp.template',
'lib/Parser_h.template',
'lib/Protocol_cpp.template',
'lib/ValueConversions_h.template',
'lib/Values_cpp.template',
'lib/Values_h.template',
'templates/Exported_h.template',
'templates/Imported_h.template',
'templates/TypeBuilder_cpp.template',
'templates/TypeBuilder_h.template',
'code_generator.py',
]
}
}

View File

@ -162,7 +162,7 @@ std::unique_ptr<Value> parseValue(
case cbor::CBORTokenTag::STRING16: {
span<uint8_t> wire = tokenizer->GetString16WireRep();
DCHECK_EQ(wire.size() & 1, 0u);
std::unique_ptr<Value> value = StringValue::create(StringUtil::fromUTF16(
std::unique_ptr<Value> value = StringValue::create(StringUtil::fromUTF16LE(
reinterpret_cast<const uint16_t*>(wire.data()), wire.size() / 2));
tokenizer->Next();
return value;
@ -204,7 +204,7 @@ std::unique_ptr<DictionaryValue> parseMap(
} else if (tokenizer->TokenTag() == cbor::CBORTokenTag::STRING16) {
span<uint8_t> key_span = tokenizer->GetString16WireRep();
if (key_span.size() & 1) return nullptr; // UTF16 is 2 byte multiple.
key = StringUtil::fromUTF16(
key = StringUtil::fromUTF16LE(
reinterpret_cast<const uint16_t*>(key_span.data()),
key_span.size() / 2);
tokenizer->Next();

View File

@ -185,8 +185,10 @@ void StringBuilder::reserveCapacity(size_t capacity) {
string_.reserve(capacity);
}
// In Chromium, we do not support big endian architectures, so no conversion is needed
// to interpret UTF16LE.
// static
String StringUtil::fromUTF16(const uint16_t* data, size_t length) {
String StringUtil::fromUTF16LE(const uint16_t* data, size_t length) {
std::string utf8;
base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(data), length, &utf8);
return utf8;

View File

@ -100,7 +100,7 @@ class {{config.lib.export_macro}} StringUtil {
return std::string(reinterpret_cast<const char*>(data), length);
}
static String fromUTF16(const uint16_t* data, size_t length);
static String fromUTF16LE(const uint16_t* data, size_t length);
static const uint8_t* CharactersLatin1(const String& s) { return nullptr; }
static const uint8_t* CharactersUTF8(const String& s) {