mirror of https://github.com/nodejs/node.git
tools: update inspector_protocol to e8ba1a7
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log PR-URL: https://github.com/nodejs/node/pull/39694 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
74c4f82282
commit
a1fac5b9a5
|
@ -103,6 +103,17 @@ def read_config():
|
|||
".lib": False,
|
||||
".lib.export_macro": "",
|
||||
".lib.export_header": False,
|
||||
# The encoding lib consists of encoding/encoding.h and
|
||||
# encoding/encoding.cc in its subdirectory, which binaries
|
||||
# may link / depend on, instead of relying on the
|
||||
# JINJA2 templates lib/encoding_{h,cc}.template.
|
||||
# In that case, |header| identifies the include file
|
||||
# and |namespace| is the namespace it's using. Usually
|
||||
# inspector_protocol_encoding but for v8's copy it's
|
||||
# v8_inspector_protocol_encoding.
|
||||
# TODO(johannes): Migrate away from lib/encoding_{h,cc}.template
|
||||
# in favor of this.
|
||||
".encoding_lib": { "header": "", "namespace": []},
|
||||
}
|
||||
for key_value in config_values:
|
||||
parts = key_value.split("=")
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
|
||||
//#include "Values.h"
|
||||
|
||||
{% if config.encoding_lib.header %}
|
||||
#include "{{config.encoding_lib.header}}"
|
||||
{% endif %}
|
||||
|
||||
{% for namespace in config.protocol.namespace %}
|
||||
namespace {{namespace}} {
|
||||
{% endfor %}
|
||||
|
@ -64,6 +68,30 @@ void escapeStringForJSONInternal(const Char* str, unsigned len,
|
|||
// to this constant.
|
||||
static constexpr int kStackLimitValues = 1000;
|
||||
|
||||
{% if config.encoding_lib.namespace %}
|
||||
using {{"::".join(config.encoding_lib.namespace)}}::Error;
|
||||
using {{"::".join(config.encoding_lib.namespace)}}::Status;
|
||||
using {{"::".join(config.encoding_lib.namespace)}}::span;
|
||||
namespace cbor {
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::CBORTokenTag;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::CBORTokenizer;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeBinary;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeDouble;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeFalse;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeFromLatin1;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeFromUTF16;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeIndefiniteLengthArrayStart;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeIndefiniteLengthMapStart;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeInt32;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeNull;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeStop;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeString8;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EncodeTrue;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::EnvelopeEncoder;
|
||||
using {{"::".join(config.encoding_lib.namespace + ['cbor'])}}::InitialByteForEnvelope;
|
||||
} // namespace cbor
|
||||
{% endif %}
|
||||
|
||||
// Below are three parsing routines for CBOR, which cover enough
|
||||
// to roundtrip JSON messages.
|
||||
std::unique_ptr<DictionaryValue> parseMap(int32_t stack_depth, cbor::CBORTokenizer* tokenizer);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
{% if config.encoding_lib.header == "" %}
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
@ -2196,3 +2197,5 @@ Status ConvertJSONToCBOR(const Platform& platform,
|
|||
{% for namespace in config.protocol.namespace %}
|
||||
} // namespace {{namespace}}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
{% if config.encoding_lib.header == "" %}
|
||||
#ifndef {{"_".join(config.protocol.namespace)}}_encoding_h
|
||||
#define {{"_".join(config.protocol.namespace)}}_encoding_h
|
||||
|
||||
|
@ -518,3 +519,4 @@ Status ConvertJSONToCBOR(const Platform& platform,
|
|||
} // namespace {{namespace}}
|
||||
{% endfor %}
|
||||
#endif // !defined({{"_".join(config.protocol.namespace)}}_encoding_h)
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue