From 889b4ded6e441b672cc39ff3e766bda8c3abc059 Mon Sep 17 00:00:00 2001 From: Johannes Henkel Date: Fri, 17 May 2019 18:26:54 -0700 Subject: [PATCH] [DevTools] Roll inspector_protocol. New Revision: 8ec18cf0885bef0b5c2a922c5dc3813cbf63e962 Change-Id: I65e271066599ed1aa1f9f8281be5b76e424d548d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1618159 Reviewed-by: Alexei Filippov Commit-Queue: Johannes Henkel Cr-Commit-Position: refs/heads/master@{#61627} --- third_party/inspector_protocol/README.v8 | 2 +- third_party/inspector_protocol/lib/Values_cpp.template | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/third_party/inspector_protocol/README.v8 b/third_party/inspector_protocol/README.v8 index a838019857..06ead2f79b 100644 --- a/third_party/inspector_protocol/README.v8 +++ b/third_party/inspector_protocol/README.v8 @@ -2,7 +2,7 @@ Name: inspector protocol Short Name: inspector_protocol URL: https://chromium.googlesource.com/deps/inspector_protocol/ Version: 0 -Revision: 0aafd2876f7485db7b07c513c0457b7cbbbe3304 +Revision: 8ec18cf0885bef0b5c2a922c5dc3813cbf63e962 License: BSD License File: LICENSE Security Critical: no diff --git a/third_party/inspector_protocol/lib/Values_cpp.template b/third_party/inspector_protocol/lib/Values_cpp.template index 764b4d37d9..7d3b907a26 100644 --- a/third_party/inspector_protocol/lib/Values_cpp.template +++ b/third_party/inspector_protocol/lib/Values_cpp.template @@ -178,7 +178,12 @@ std::unique_ptr parseMap( key = StringUtil::fromUTF8(key_span.data(), key_span.size()); tokenizer->Next(); } else if (tokenizer->TokenTag() == cbor::CBORTokenTag::STRING16) { - return nullptr; // STRING16 not supported yet. + span key_span = tokenizer->GetString16WireRep(); + if (key_span.size() & 1) return nullptr; // UTF16 is 2 byte multiple. + key = StringUtil::fromUTF16( + reinterpret_cast(key_span.data()), + key_span.size() / 2); + tokenizer->Next(); } else { // Error::CBOR_INVALID_MAP_KEY return nullptr;