Commit 6bbc14de authored by Andrey Kosyakov's avatar Andrey Kosyakov Committed by Chromium LUCI CQ

Roll inspector_protocol to include fix for issue 1154370

Bug: 1154370
Change-Id: Idba34c7fdf87f561747fc9ca7d37656aaffe2886
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626125
Auto-Submit: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: default avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843106}
parent 2531e507
......@@ -2,7 +2,7 @@ Name: inspector protocol
Short Name: inspector_protocol
URL: https://chromium.googlesource.com/deps/inspector_protocol/
Version: 0
Revision: 94298cef795ec994106bdaff002c41182911b767
Revision: 62c7be86bf5728a7b18a74408d77c07bd40ef383
License: BSD
License File: LICENSE
Security Critical: yes
......
......@@ -113,6 +113,8 @@ std::string Status::Message() const {
return "BINDINGS: string8 value expected";
case Error::BINDINGS_BINARY_VALUE_EXPECTED:
return "BINDINGS: binary value expected";
case Error::BINDINGS_DICTIONARY_VALUE_EXPECTED:
return "BINDINGS: dictionary value expected";
}
// Some compilers can't figure out that we can't get here.
return "INVALID ERROR CODE";
......
......@@ -77,6 +77,7 @@ enum class Error {
BINDINGS_STRING_VALUE_EXPECTED = 0x34,
BINDINGS_STRING8_VALUE_EXPECTED = 0x35,
BINDINGS_BINARY_VALUE_EXPECTED = 0x36,
BINDINGS_DICTIONARY_VALUE_EXPECTED = 0x37,
};
// A status value with position that can be copied. The default status
......
......@@ -96,6 +96,10 @@ bool ProtocolTypeTraits<std::unique_ptr<DictionaryValue>>::Deserialize(
std::unique_ptr<Value> res;
if (!ProtocolTypeTraits<std::unique_ptr<Value>>::Deserialize(state, &res))
return false;
if (res->type() != Value::TypeObject) {
state->RegisterError(Error::BINDINGS_DICTIONARY_VALUE_EXPECTED);
return false;
}
*value = DictionaryValue::cast(std::move(res));
return true;
}
......
......@@ -27,6 +27,9 @@ def assignType(item, type, is_array=False, map_binary_to_string=False):
type = 'string'
if map_binary_to_string and type == 'binary':
type = 'string'
if 'description' in item:
item['description'] = (item['description'] +
' (Encoded as a base64 string when passed over JSON)')
if type in primitiveTypes:
item['type'] = type
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment