Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
e66648e
esm: remove experimental status from JSON modules
MylesBorins May 17, 2019
1a8e67c
doc: simplify contributing documentation
Trott May 20, 2019
4716caa
tls: set tlsSocket.servername as early as possible
oyyd May 17, 2019
3b6424f
deps: histogram: unexport symbols
bnoordhuis May 23, 2019
c0cf173
src: ignore SIGXFSZ, don't terminate (ulimit -f)
bnoordhuis May 23, 2019
588fd0c
http, http2: flag for overriding server timeout
ofrobots May 14, 2019
8040d8b
test: increase debugging information on failure
Trott May 21, 2019
940577b
src: move ThreadPoolWork inlines into a -inl.h
sam-github May 22, 2019
02f794a
src: remove memory_tracker-inl.h from header files
sam-github May 17, 2019
d774ea5
src: remove env-inl.h from header files
sam-github May 17, 2019
530e63a
assert: remove unreachable code
Trott May 20, 2019
2b7ad12
n-api: DRY napi_coerce_to_x() API methods
bnoordhuis May 21, 2019
a9f9557
child_process: remove extra shallow copy
zero1five May 21, 2019
be1166f
esm: refactor createDynamicModule()
cjihrig May 22, 2019
a9a400e
test: update wpt/resources to e1fddfbf80
joyeecheung May 22, 2019
65d4f73
test: use ShellTestEnvironment in WPT
joyeecheung May 22, 2019
144db48
test: update wpt/url to 418f7fabeb
joyeecheung May 22, 2019
b54f3e0
tools: edit .eslintrc.js for minor maintainability improvements
Trott May 24, 2019
155b947
test: replace flag with option
Trott May 21, 2019
17abc8c
test: favor arrow functions for anonymous callbacks
Trott May 21, 2019
a4c1fd5
test: refactor test-https-agent-additional-options
Trott May 21, 2019
bfcbab4
test: fix test-https-agent-additional-options
Trott May 21, 2019
6981565
doc: edit stability index overview
Trott May 22, 2019
10e0d7f
tls: support the hints option
lpinca May 22, 2019
5bbc6d7
assert: remove unreachable code
Trott May 23, 2019
041b222
doc,n-api: fix typo in N-API introduction
richardlau May 23, 2019
08b0ca9
build,win: create junction instead of symlink to `out\%config%`
refack May 16, 2019
e3bb2ae
doc: remove experimental status for JSON documentation
Trott May 23, 2019
85f505c
doc: add version info for types
mhdawson May 17, 2019
e8fa067
tls: destroy trace BIO instead of leaking it
sam-github May 23, 2019
1da5acb
os: assume UTF-8 for hostname
addaleax May 24, 2019
34ef9e4
test: detect missing postmortem metadata
cjihrig May 22, 2019
9b90385
Revert "lib: print to stdout/stderr directly instead of using console"
richardlau May 22, 2019
263e533
doc: reposition "How to Contribute" README section
anish-94 May 22, 2019
9d9b32e
doc: fix for OutgoingMessage.prototype._headers/_headerNames
dnalborczyk May 6, 2019
44846ae
src: move DiagnosticFilename inlines into a -inl.h
sam-github May 22, 2019
7a7fc4e
doc: update n-api support matrix
teams2ua May 4, 2019
d99e703
inspector: implement --heap-prof
joyeecheung Apr 23, 2019
724d9c8
test: change expected and actual values in assert call
oksemonenko May 26, 2019
531669b
test: fix test-http2-multiheaders-raw
ShGKme May 26, 2019
f5bb1b3
test: switch actual value argument and expected in deepStrictEqual call
VetoS88 May 26, 2019
b83571d
test: add a test case for the path.posix.resolve
ShGKme May 26, 2019
e7966bc
test: unhardcode server port
MurkyMeow May 26, 2019
b117f6d
test: switch assertEqual arguments
zeckson May 26, 2019
728bc2f
tools: update dependencies in tools/doc
Trott May 27, 2019
652cadb
test: fix arguments order of comparsion functions
m0rtyn May 26, 2019
51ccdae
test: expect wpt/encoding/streams to fail
joyeecheung May 22, 2019
0f86c2b
test: run WPT in subdirectories
joyeecheung May 22, 2019
8fc6914
test: update wpt/encoding to 7287608f90
joyeecheung May 22, 2019
313077e
test: expect wpt/encoding/encodeInto.any.js to fail
joyeecheung May 22, 2019
8c35198
http2: support net.Server options
lpinca May 20, 2019
f621b8f
doc: reword Experimental stability index
Trott May 26, 2019
3ba354a
test: add test for util.inspect
Nievl May 26, 2019
6cd64c8
doc,test: clarify that Http2Stream is destroyed after data is read
mildsunrise May 26, 2019
2a509d4
test: switch assertEqual arguments
zeckson May 26, 2019
67b692b
test: add test case for checking typeof mgf1Hash
Nievl May 26, 2019
b7cd0de
doc: fix typo in pipe from async iterator example
lpinca May 25, 2019
83aaef8
http2: fix tracking received data for maxSessionMemory
addaleax May 26, 2019
0fe16ed
tls: group chunks into TLS segments
mildsunrise May 24, 2019
630cc3a
test: cover util.inspect on boxed primitive with colors
pinguinjkeke May 26, 2019
b5b234d
test: add testcase for SourceTextModule custom inspect
ch1ller0 May 26, 2019
512ab1f
inspector: removing checking of non existent field in lib/inspector.js
Keroosha May 26, 2019
b9cc407
src: make UNREACHABLE variadic
refack May 25, 2019
1a179e1
src: use ArrayBufferViewContents more frequently
addaleax May 26, 2019
a1788de
doc: adds link to nightly code coverage report
srcmake May 27, 2019
d982f0b
meta: create github support file
devsnek May 27, 2019
449ee8d
console: fix table() output
mscdex May 26, 2019
682319f
test: switch assertEqual arguments
zeckson May 26, 2019
6f9aa3f
test: add test cases for paramEncoding 'explicit'
oksemonenko May 26, 2019
6ca4f03
doc: revise additional Experimental status text
Trott May 28, 2019
25eb05a
lib: removed unnecessary fs.realpath `options` arg check + tests
opterion May 26, 2019
6548b91
tls: trace errors can show up as SSL errors
sam-github May 23, 2019
5eccd64
stream: convert existing buffer when calling .setEncoding
addaleax May 28, 2019
33236b7
src: export number_of_native_contexts and number_of_detached_contexts
May 28, 2019
9220a68
crypto: fix KeyObject handle type error message
pinguinjkeke May 26, 2019
0d74198
test: cover import of a *.node file with a policy manifest
zeckson May 26, 2019
d406785
src: unimplement deprecated v8-platform methods
targos May 25, 2019
0e1ce20
test: rsa-pss generateKeyPairSync invalid option hash
zeckson May 26, 2019
38e3827
test: add util inspect null getter test
mihan007 May 26, 2019
77ff597
doc: add missing --experimental-wasm-modules docs
cjihrig May 29, 2019
f4fc75d
doc: add missing status to DEP0121
cjihrig May 29, 2019
bab9f5a
doc: add information to revoked deprecations
cjihrig May 29, 2019
e72d4aa
errors: create internal connResetException
Trott May 29, 2019
a75a59d
tools: update inspector_protocol to 0aafd2
targos May 19, 2019
cc69d5a
doc,tools: get altDocs versions from CHANGELOG.md
richardlau May 12, 2019
6129376
test: add coverage for sparse array maxArrayLength
wentout May 30, 2019
c566401
doc: warn about relying on fs gc close behavior
benjamingr May 30, 2019
10bdd13
test: rename test-performance to test-perf-hooks
ryzokuken May 30, 2019
9b08c45
build,aix: link with `noerrmsg` to eliminate warnings
refack May 19, 2019
8b38dfb
http: call write callback even if there is no message body
lpinca May 20, 2019
799aeca
http2: respect inspect() depth
cjihrig May 30, 2019
11c3ddb
doc: simplify system call material in doc overview
Trott May 30, 2019
70b4854
doc: fix the wrong name of AssertionError
kyle7zhang May 30, 2019
24eaeed
http: fix socketOnWrap edge cases
apapirovski May 30, 2019
1865057
meta: correct personal info
refack May 28, 2019
d948656
http: fix deferToConnect comments
ronag May 26, 2019
89483be
inspector: more conservative minimum stack size
bnoordhuis May 24, 2019
c683cd9
doc: improve explanation for directory with fs.rename()
Trott Jun 2, 2019
9229825
test: covering destroying when worker already disconnected
Keroosha May 26, 2019
ef25ac5
doc: clarify wording in modules.md
Alex-Temny May 24, 2019
2ce24a9
tools: fix js2c regression
refack May 30, 2019
ea2d550
child_process: move exports to bottom for consistent code style
himself65 May 29, 2019
887dd60
test: simplify fs promises test
dnalborczyk Apr 15, 2019
a47ee80
stream: convert string to Buffer when calling `unshift(<string>)`
marcosc90 Apr 11, 2019
1827256
test: add coverage for unserializable worker thread error
Trott May 31, 2019
6a5ce36
test: handle unknown message type in worker threads
Trott May 31, 2019
23119ca
inspector: supported NodeRuntime domain in worker
alexkozy May 15, 2019
6421974
2019-06-04, Version 12.4.0 (Current)
targos Jun 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tools: update inspector_protocol to 0aafd2
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: #27770
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
targos and bnoordhuis committed Jun 1, 2019
commit a75a59d3e3695152bc0ed10fa58355813f0179ca
5 changes: 4 additions & 1 deletion src/inspector/node_inspector.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
'node_protocol_files': [
'<(protocol_tool_path)/lib/Allocator_h.template',
'<(protocol_tool_path)/lib/Array_h.template',
'<(protocol_tool_path)/lib/Collections_h.template',
'<(protocol_tool_path)/lib/base_string_adapter_cc.template',
'<(protocol_tool_path)/lib/base_string_adapter_h.template',
'<(protocol_tool_path)/lib/DispatcherBase_cpp.template',
'<(protocol_tool_path)/lib/DispatcherBase_h.template',
'<(protocol_tool_path)/lib/encoding_cpp.template',
'<(protocol_tool_path)/lib/encoding_h.template',
'<(protocol_tool_path)/lib/ErrorSupport_cpp.template',
'<(protocol_tool_path)/lib/ErrorSupport_h.template',
'<(protocol_tool_path)/lib/Forward_h.template',
Expand Down
16 changes: 16 additions & 0 deletions src/inspector/node_string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ String fromUTF8(const uint8_t* data, size_t length) {
return std::string(reinterpret_cast<const char*>(data), length);
}

String fromUTF16(const uint16_t* data, size_t length) {
icu::UnicodeString utf16(reinterpret_cast<const char16_t*>(data), length);
std::string result;
return utf16.toUTF8String(result);
}

const uint8_t* CharactersUTF8(const String& s) {
return reinterpret_cast<const uint8_t*>(s.data());
}

size_t CharacterCount(const String& s) {
icu::UnicodeString utf16 =
icu::UnicodeString::fromUTF8(icu::StringPiece(s.data(), s.length()));
return utf16.countChar32();
}

} // namespace StringUtil
} // namespace protocol
} // namespace inspector
Expand Down
17 changes: 7 additions & 10 deletions src/inspector/node_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ using String = std::string;
using StringBuilder = std::ostringstream;
using ProtocolMessage = std::string;

class StringUTF8Adapter {
public:
explicit StringUTF8Adapter(const std::string& string) : string_(string) { }
const char* Data() const { return string_.data(); }
size_t length() const { return string_.length(); }

private:
const std::string& string_;
};

namespace StringUtil {
// NOLINTNEXTLINE(runtime/references) This is V8 API...
inline void builderAppend(StringBuilder& builder, char c) {
Expand Down Expand Up @@ -82,6 +72,13 @@ std::unique_ptr<Value> parseMessage(const std::string& message, bool binary);
ProtocolMessage jsonToMessage(String message);
ProtocolMessage binaryToMessage(std::vector<uint8_t> message);
String fromUTF8(const uint8_t* data, size_t length);
String fromUTF16(const uint16_t* data, size_t length);
const uint8_t* CharactersUTF8(const String& s);
size_t CharacterCount(const String& s);

// Unimplemented. The generated code will fall back to CharactersUTF8().
inline uint8_t* CharactersLatin1(const String& s) { return nullptr; }
inline const uint16_t* CharactersUTF16(const String& s) { return nullptr; }

extern size_t kNotFound;
} // namespace StringUtil
Expand Down
2 changes: 1 addition & 1 deletion src/inspector/tracing_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class SendMessageRequest : public Request {
if (frontend_wrapper == nullptr) return;
auto frontend = frontend_wrapper->get();
if (frontend != nullptr) {
frontend->sendRawNotification(message_);
frontend->sendRawJSONNotification(message_);
}
}

Expand Down
36 changes: 36 additions & 0 deletions tools/inspector_protocol/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Defines the Chromium style for automatic reformatting.
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# This defaults to 'Auto'. Explicitly set it for a while, so that
# 'vector<vector<int> >' in existing files gets formatted to
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11

# Make sure code like:
# IPC_BEGIN_MESSAGE_MAP()
# IPC_MESSAGE_HANDLER(WidgetHostViewHost_Update, OnUpdate)
# IPC_END_MESSAGE_MAP()
# gets correctly indented.
MacroBlockBegin: "^\
BEGIN_MSG_MAP|\
BEGIN_MSG_MAP_EX|\
BEGIN_SAFE_MSG_MAP_EX|\
CR_BEGIN_MSG_MAP_EX|\
IPC_BEGIN_MESSAGE_MAP|\
IPC_BEGIN_MESSAGE_MAP_WITH_PARAM|\
IPC_PROTOBUF_MESSAGE_TRAITS_BEGIN|\
IPC_STRUCT_BEGIN|\
IPC_STRUCT_BEGIN_WITH_PARENT|\
IPC_STRUCT_TRAITS_BEGIN|\
POLPARAMS_BEGIN|\
PPAPI_BEGIN_MESSAGE_MAP$"
MacroBlockEnd: "^\
CR_END_MSG_MAP|\
END_MSG_MAP|\
IPC_END_MESSAGE_MAP|\
IPC_PROTOBUF_MESSAGE_TRAITS_END|\
IPC_STRUCT_END|\
IPC_STRUCT_TRAITS_END|\
POLPARAMS_END|\
PPAPI_END_MESSAGE_MAP$"
34 changes: 34 additions & 0 deletions tools/inspector_protocol/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

static_library("encoding") {
sources = [
"encoding/encoding.cc",
"encoding/encoding.h",
]
}

# encoding_test is part of the unittests, defined in
# test/unittests/BUILD.gn.

import("../../gni/v8.gni")

v8_source_set("encoding_test") {
sources = [
"encoding/encoding_test.cc",
"encoding/encoding_test_helper.h",
]
configs = [
"../..:external_config",
"../..:internal_config_base",
]
deps = [
":encoding",
"../..:v8_libbase",
"../../src/inspector:inspector_string_conversions",
"//testing/gmock",
"//testing/gtest",
]
testonly = true
}
33 changes: 33 additions & 0 deletions tools/inspector_protocol/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Chromium inspector (devtools) protocol

This package contains code generators and templates for the Chromium
inspector protocol.

The canonical location of this package is at
https://chromium.googlesource.com/deps/inspector_protocol/

In the Chromium tree, it's rolled into
https://cs.chromium.org/chromium/src/third_party/inspector_protocol/

In the V8 tree, it's rolled into
https://cs.chromium.org/chromium/src/v8/third_party/inspector_protocol/

See also [Contributing to Chrome Devtools Protocol](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit).

We're working on enabling standalone builds for parts of this package for
testing and development, please feel free to ignore this for now.
But, if you're familiar with
[Chromium's development process](https://www.chromium.org/developers/contributing-code)
and have the depot_tools installed, you may use these commands
to fetch the package (and dependencies) and build and run the tests:

fetch inspector_protocol
cd src
gn gen out/Release
ninja -C out/Release json_parser_test
out/Release/json_parser_test

You'll probably also need to install g++, since Clang uses this to find the
standard C++ headers. E.g.,

sudo apt-get install g++-8
2 changes: 1 addition & 1 deletion tools/inspector_protocol/README.node
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: inspector protocol
Short Name: inspector_protocol
URL: https://chromium.googlesource.com/deps/inspector_protocol/
Version: 0
Revision: f67ec5180f476830e839226b5ca948e43070fdab
Revision: 0aafd2876f7485db7b07c513c0457b7cbbbe3304
License: BSD
License File: LICENSE
Security Critical: no
Expand Down
36 changes: 16 additions & 20 deletions tools/inspector_protocol/code_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import os.path
import sys
import optparse
import argparse
import collections
import functools
import re
Expand All @@ -17,6 +17,13 @@

import pdl

try:
unicode
except NameError:
# Define unicode for Py3
def unicode(s, *_):
return s

# Path handling for libraries and templates
# Paths have to be normalized because Jinja uses the exact template path to
# determine the hash used in the cache filename, and we need a pre-caching step
Expand Down Expand Up @@ -53,27 +60,16 @@ def init_defaults(config_tuple, path, defaults):
return collections.namedtuple('X', keys)(*values)

try:
cmdline_parser = optparse.OptionParser()
cmdline_parser.add_option("--output_base")
cmdline_parser.add_option("--jinja_dir")
cmdline_parser.add_option("--config")
cmdline_parser.add_option("--config_value", action="append", type="string")
arg_options, _ = cmdline_parser.parse_args()
cmdline_parser = argparse.ArgumentParser()
cmdline_parser.add_argument("--output_base", type=unicode, required=True)
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")
arg_options = cmdline_parser.parse_args()
jinja_dir = arg_options.jinja_dir
if not jinja_dir:
raise Exception("jinja directory must be specified")
jinja_dir = jinja_dir.decode('utf8')
output_base = arg_options.output_base
if not output_base:
raise Exception("Base output directory must be specified")
output_base = output_base.decode('utf8')
config_file = arg_options.config
if not config_file:
raise Exception("Config file name must be specified")
config_file = config_file.decode('utf8')
config_values = arg_options.config_value
if not config_values:
config_values = []
except Exception:
# Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html
exc = sys.exc_info()[1]
Expand Down Expand Up @@ -631,7 +627,7 @@ def main():
"Array_h.template",
"DispatcherBase_h.template",
"Parser_h.template",
"CBOR_h.template",
"encoding_h.template",
]

protocol_cpp_templates = [
Expand All @@ -641,7 +637,7 @@ def main():
"Object_cpp.template",
"DispatcherBase_cpp.template",
"Parser_cpp.template",
"CBOR_cpp.template",
"encoding_cpp.template",
]

forward_h_templates = [
Expand Down
6 changes: 6 additions & 0 deletions tools/inspector_protocol/codereview.settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is used by git-cl to get repository specific information.
CC_LIST: chromium-reviews@chromium.org
CODE_REVIEW_SERVER: codereview.chromium.org
GERRIT_HOST: True
PROJECT: inspector_protocol
VIEW_VC: https://chromium.googlesource.com/deps/inspector_protocol/+/
2 changes: 0 additions & 2 deletions tools/inspector_protocol/convert_protocol_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
# found in the LICENSE file.

import argparse
import collections
import json
import os.path
import re
import sys

import pdl
Expand Down
Loading