-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore squash commit b42f63ca (inspector_protocol) #1481
Merged
dahlstrom-g
merged 3 commits into
youtube:main
from
dahlstrom-g:inspector_protocol-8170c7d7
Sep 6, 2023
Merged
Restore squash commit b42f63ca (inspector_protocol) #1481
dahlstrom-g
merged 3 commits into
youtube:main
from
dahlstrom-g:inspector_protocol-8170c7d7
Sep 6, 2023
Commits on Apr 9, 2020
-
Squashed 'third_party/inspector_protocol/' content from commit 5768a4…
…49acc git-subtree-dir: third_party/inspector_protocol git-subtree-split: 5768a449acc0407bf55aef535b18d710df2a14f2
Configuration menu - View commit details
-
Copy full SHA for 6d4c7c0 - Browse repository at this point
Copy the full SHA 6d4c7c0View commit details -
Squashed 'third_party/inspector_protocol/' changes from 5768a449acc..…
…8170c7d7cdc b/151643322 8170c7d7cdc Move Serializable from templates into CRDTP and add a test. 7a44a37f66b Smoothen CRDTP library surface: json_platform.h with two functions. 4c2a3acaea9 Accidentally deleted too many headers. ad7550c1471 Cleanups: - Remove redundant includes - Rename StreamingParserHandler to ParserHandler - Fix header guards (e.g. status.h) d020a9e614d Decompose the crdtp library into multiple headers. 112f668538c Simplify structure of third_party/inspector_protocol library. d2fc9b958e1 New Serializable bbc72612409 Trim some serializeToJSON functions. a14dad30f0e Make ValueMaybe::TakeJust is_just_ = false. 35c6d4d0d80 Make code generator python3.7 compatible (async keyword). ba9d4a07ca8 Remove unused local variable in generated code for async methods ed2845d5409 Add factory method for creating error responses 51e2aa7bd60 Add CBORTokenizer::GetEnvelope(). d9682621f5f Add CBOR_ARRAY_START_EXPECTED error code. 31c11aeda61 Add Error::BINDINGS_MANDATORY_FIELD_MISSING. d114a62e144 Add a check that the contents of the envelope match its length. Adjust the tests accordingly. 692cd324955 Fix typo emtpy -> empty. d48ba2079ff In json encoder, reject incomplete utf8 sequence. 207c7acdf20 Reformat the Python code slightly so that it fits into 80 cols. It's slightly easier on the eye and in addition and just in case, should facilitate porting to architectures that can read punch cards [1]. :-) aec57d43b6a Merge "Use fromUTF16LE on convertion from CBOR string16 to native string" a08f2f9b8dd Remove unused file inspector_protocol.gypi, as suggested in https://chromium-review.googlesource.com/c/v8/v8/+/1678273/13/third_party/inspector_protocol/inspector_protocol.gypi#b1 1a355ea5098 Use fromUTF16LE on convertion from CBOR string16 to native string 8b7ea912e51 Move protocol::Maybe implementation to library. 83b1154a966 Implement protocol::Array as std::vector typedefs. 91eb1c8784a Merge "Reimplement Maybe." c488ba27e69 Reimplement Maybe. 9b4a4aa4e7c Remove unused enum NotNullTagEnum. 2f51e05cefe Remove the IP_NOEXCEPT macro trickery from Maybe. It looks like it's no longer needed, v8 bots are happy without it. d7b099b4d55 Document where the error codes came from. 912eb6872ef Add comparison functions for span. 547c5b8c376 Add a test for disallowing overlong UTF-8 encodings, esp. for the corner case, the ASCII DEL character. ca525fcb0e8 Readme / comment updates. e8ba1a7665b Make the JINJA2 template for the encoding library copy conditional. 39ca567f4a6 Fix compile for v8. 97d3146872f Change return value of ReadTokenStart to size_t. df9e02d583c Merge "Clarify and clean up CBOR parser comments / tests." a53e96d31a2 Clarify and clean up CBOR parser comments / tests. fe0467fd105 Regen the JINJA templates. 89c4adfdeca Merge "fix parsing of the last ASCII character" 37518ac4214 fix parsing of the last ASCII character a3663214f75 When parsing negative INT32 values, check the payload directly against std::numeric_limits<int32_t>::max(). 8ec18cf0885 Support STRING16 in the template when converting CBOR map keys to protocol::Value. This was an oversight, while the JSON<->CBOR converter already supports such strings, we were dropping them in this particular conversion. 0aafd2876f7 Rework the checks so that they are tight for 32 Bit architectures as well. 9444d40bcbd Regen templates. I forgot this in the previous PR, sorry. 5a9c7497b59 For definitive length tokens, handle values larger than std::ptrdiff_t. 50a14c3884c Add span<uint16_t> JSON parsing to ConvertJSONToCBOR. 2039736177e Attempt to split the parts of encoding_test.cc which must be adapted to other code bases to get this to run. 0fe7ff5484d Address the FIXME: JSON encoder failed to emit ',' or ':' if the output is std::vector<uint8_t>. We don't use this in production thus far, but I want to so that's how I ran into the bug. 51f70deb7e9 Make gcc happy. This is needed to get this code to compile in v8 bots. 8c3f1afc2dc update templates 01298a8191a Initialize some variables for paranoia. Don't emit more than one error. 9385d9b8d74 Fix incorrectness in length check; we need to add the length for the start of the token, plus the length of the payload and compare with the overall length of the cbor span. 9af6c721029 Merge "Use argparse in code_generator.py" 97a468f772d //pdl.py: Fix SyntaxWarnings about invalid escape sequences 4d296750497 Use argparse in code_generator.py 467f0262e16 Add transcode.cc. A simple utility for transcoding files between JSON and CBOR. 29ee9afd1cc Remove AppendStringValueToMapBinary from the templates. This is now covered by inspector_protocol_encoding::cbor::AppendString8EntryToCBORMap. 13b84fe7332 Stop using name overloading for sending raw notifications. 4c2d2efe9aa Regen the templates for the updated copy of the encoding library. b5bdbea24b0 Add Status::ToASCIIString for more convenient error handling. 0ffa9dd6448 Bugfix: When comparing the last byte in the message with the stop byte, avoid comparing a char with a uint8_t. This happens because std::string could be the payload, so then, std::string::back() is a reference to a char, not a uint8_t. 34bdcd1fb46 Add SpanFrom for const char* to avoid allocating std::string by accident. 0f1e67db47d update templates 1d5f8f39896 Use overloads for SpanFromVector / SpanFromStdString for brevity 16b370abe6f Add AppendString8EntryToCBORMap. a8dc93daa67 Add JSON <-> CBOR conversion routines. Support both std::string and std::vector<uint8_t>. 454b6bcf7d0 Bump stack limit to 300 for heap profile messages. e7e48a48215 When encoding JSON, represent non-finite double values as null. 1e65f2e3a97 Lower the stack limit for parsing json / cbor to 200. a6bdf8a7cc9 Merge the encoding library into one .h, one .cc, and one _test.cc. be5f927f77f locale_t isn't available on Windows, so I'll try to use the std:: functions instead. Earlier, I wasn't anticipating that this gets compiled on Windows, but when I added a dependency to this from Chromium, it did. So, trying to make it work there. 1b870d0b260 Tweaks to the standalone build. c1f864824e5 In Values_cpp.template, always check for the empty string first. 0013c308393 Merge "[DevTools] Support UTF16 strings with binary protocol (ip)." b13e24ccee6 [DevTools] Support UTF16 strings with binary protocol (ip). f874a3faed7 test: Update googletest and rename TEST_CASE -> TEST_SUITE. dab5e33f5a9 Add EncodeFromLatin1 and EncodeFromUTF16 to the CBOR encoder. 97e431fa733 Lift the assumption that STRING8 = US-ASCII. So now we have STRING8 = UTF8; STRING16 = possibly invalid UTF16. f67ec5180f4 Fix the StringUtil::fromDouble routine for -.123. 9dcc77593be Fix more CBOR and Binary issues c40253f87c4 Temporarily disable DumpCBOR() e21d2072afd Fix binary map deserialization 1750fd15882 Land DumpCBOR for debugging purposes. b728c964825 Make import / export routines happy with binary. ea08979a755 Remove semicolons 260f38186f3 Added AppendStringValueToMap to patch protocol messages ec358ccfd63 Pacify the olde V8 compilers, which do not yet understand C++14, when converting from std::unique_ptr<Foo> to std::unique_ptr<SuperFoo>. Also remove an assert (we'd need to add the cassert include but I don't want to). 75a67ffd32f First cut for converting between protocol::Value and CBOR. 1696ff7dedc Introduce StringUTF8Afapter trait a0abcb6bfbd Follow up to the binary changes, add missing fromBinary definition. e8a0de7351b Make generator v8-friendly. d2f819f6307 DevTools: manage String and ProtocolMessage types independently. c4ebae63b0f Cleanups: casting and typos 02ca2bc2bb3 Port to C++11, since V8 doesn't support C++14 yet. b263ce3258b Friday afternoon hack: code generator for the code generator. :-) e1991e6a66f Copy/paste the CBOR encoding library into CBOR_{h,cpp}.template. d5498d21588 Support 32 bit architectures. d150e94b438 Fix build, sorry I forgot to rename variable ref. :-) 95841efcf9e Merge "Address lint error: parameter is const Platform* deps." 1219afe36b0 Address lint error: parameter is const Platform* deps. 92696f07e9a Define fixed dfaf19b7350 Introduce default string implementation for base 13bc7107a05 Merge "ERROR -> ERROR_VALUE..." 61b93510468 Merge "Explicitly clip a couple variables to 32 bit." 58ddcde35a4 Avoid referencing the inspector_protocol namespace in code. 9182c455da0 Explicitly clip a couple variables to 32 bit. 082f59af082 ERROR -> ERROR_VALUE... 2ebe00699d6 Add a StrEq function to compare two span<uint8_t> for equality. Expose single byte constants that are needed in client code. Add hint for g++-8 to readme. 8dfd1432319 Add comments into generated code indicating the template that generated it. Remove unused backward compat file (CheckProtocolCompatibility.py). d6a19bda351 Merge "Cleanup: NewJsonWriter -> NewJSONWriter." eb1f185a7f9 Merge "Add a mechanism for recording an ENVELOPE item." 9482293608e Add a mechanism for recording an ENVELOPE item. 96c320e408c Merge "make code generator compatible with Python 3" cb0e1f200af Cleanup: NewJsonWriter -> NewJSONWriter. 867953f038e make code generator compatible with Python 3 0afb26d755b Roll mini_chromium to what Crashpad uses. 79a01952e76 inspector_protcol: prepare code generator for python3 8515c2a1c5c [ubsan] Fix UBSan warnings in Maybe<bool> specialization 9977c471be5 Trivial: Fix capitalization in encoding/ headers. 9cba74155ff BUILD adjustments for easy integration into Chromium tree. fdbdb154336 Revert "Remove copying in protocol type conversion" 07d26b84ac9 Introduce a CBORTokenizer abstraction, plus refactorings. fe8468be408 Add support for binary (arbitrary std::vector<uint8>) payload in CBOR values. 379aab613cd Rename binary to CBOR, to reduce confusion. 68bba6d86b6 When converting from json, store 7 bit strings as STRING (major type 3). 74b496c7764 Rework std::vector::reserve calls. 8dcda48587f In json_parser.cc, transcode from utf8->utf16 for 8 bit input. 10e153b6e53 Add support for UTF8 strings to binary_encoder{.h,.cc}. 56de202cf3f Patch a leading 0 before the decimal dot in JSON double renderings if needed. 89839795ea1 Bugfix: Must advance the input when reading stop bytes. ec079869626 Add tests to cover the binary (CBOR) decoding errors. 40774f73e11 Add a binary parser which sends events to a JsonParserHandler. 84c9eab4743 Add unittests for the JSON parser errors. a168ca5b1d5 Add a Status data type which we can start using instead of booleans. 19e38a875ec Rename SystemDeps into Platform. 05a2187530a Merge "Add a simple JSON serializer which can be driven via a JsonParseHandler." e7bdf029e70 Add a simple JSON serializer which can be driven via a JsonParseHandler. f00f9952d24 Merge "Remove unused files." 99ae71d5234 Fix left side type for >=, by casting to size_t. 2b7d6014a72 Merge "Add JSON to binary (CBOR) converter." 6139379eabb Add JSON to binary (CBOR) converter. 1fe6e6c3101 Make destructors of interfaces virtual. 69de9c1b993 Extract JsonHandler -> JsonParserHandler for reuse in binary_encoding. 30d75cb72a2 Merge "Use span for the interface of the JSON parser." 1e434081f5b Merge "Remove unused macro." c8c12a7ef52 Use span for the interface of the JSON parser. 701f5ce799e Encode / Decode UTF16 routines, and inspector_protocol::span. 0b1fef053f0 Remove the encoding library placeholder, now that there's some "real" code. 81ba4a5a3e7 A Callback-style JSON parser. 761f95ca368 Add rudimentary standalone build. 2076f77b9c1 Remove unused files. 614fed1a132 Remove unused macro. 55e462a54f3 Add myself to OWNERS, so I can have a +2 button after code review is done. 8bdfb3cb7cd Remove copying in protocol type conversion 7f3ba64690f inspector_protocol: added missing <memory> header 460186cff1f [DevTools] Support the binary type in .pdl files. 7c91103242e Make Object constructor public 1c471db574e [inspector_protocol] Handle redirects in all entry points ffd0ba561ad Revert "Introduce SerializableToValue in order to reduce the number of allocations." b484c214dfe Merge "Revert "[inspector_protocol] Clarify use of $ref type in generated JSON"" cab931a58cc Revert "[inspector_protocol] Clarify use of $ref type in generated JSON" 281043540b0 Merge "[inspector_protocol] Clarify use of $ref type in generated JSON" de3b703ec87 Introduce SerializableToValue in order to reduce the number of allocations. 28b77875b4e [inspector_protocol] Clarify use of $ref type in generated JSON Change-Id: I85fba31796b1a630aa44265eb137ee6b511b39e3 git-subtree-dir: third_party/inspector_protocol git-subtree-split: 8170c7d7cdcfc77e245518de364ff3f6988cb425
Configuration menu - View commit details
-
Copy full SHA for b42f63c - Browse repository at this point
Copy the full SHA b42f63cView commit details
Commits on Sep 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f4b130c - Browse repository at this point
Copy the full SHA f4b130cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.