Implement protocol::Array as std::vector typedefs.

Instead of a custom collection in Array_h.template,
protocol::Array<Foo> shall be std::vector<std::unique_ptr<Foo>>
if Foo is some domain specific protocol type, and
std::vector<Foo> otherwise (for int,double,bool and String).

This requires large scale but mechanical changes as I'm rolling
this. It will not change behavior, but improves performance
in some cases because there's less copying. E.g., the custom
collection is naive and will copy a string on every array access
with protocol::Array::get(i), whereas std::vector<string>[i]
returns a reference.

V8 Roll is here:
https://chromium-review.googlesource.com/c/v8/v8/+/1654091

Chromium Roll is here (still in progress):
https://chromium-review.googlesource.com/c/chromium/src/+/1657628

Change-Id: Ia5ce1f131d133a57f75d349c299270f68f716de0
7 files changed
tree: 5f23fba241bcb8edd41d0c72904023c5c3f698b1
  1. .clang-format
  2. .gitignore
  3. .gn
  4. BUILD.gn
  5. BUILDCONFIG.gn
  6. DEPS
  7. LICENSE
  8. OWNERS
  9. README.md
  10. WATCHLISTS
  11. base/
  12. check_protocol_compatibility.py
  13. code_generator.py
  14. codereview.settings
  15. concatenate_protocols.py
  16. convert_protocol_to_json.py
  17. encoding/
  18. gen_encoding_templates.py
  19. inspector_protocol.gni
  20. inspector_protocol.gypi
  21. lib/
  22. pdl.py
  23. sample_config.json
  24. sample_expected_errors.json
  25. templates/
  26. testing/
  27. third_party/
README.md

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.

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 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