summaryrefslogtreecommitdiff
path: root/deps/v8/third_party/inspector_protocol/lib
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/third_party/inspector_protocol/lib')
-rw-r--r--deps/v8/third_party/inspector_protocol/lib/ValueConversions_cpp.template4
-rw-r--r--deps/v8/third_party/inspector_protocol/lib/base_string_adapter_cc.template5
2 files changed, 6 insertions, 3 deletions
diff --git a/deps/v8/third_party/inspector_protocol/lib/ValueConversions_cpp.template b/deps/v8/third_party/inspector_protocol/lib/ValueConversions_cpp.template
index 36c8dcc356..a16b522c38 100644
--- a/deps/v8/third_party/inspector_protocol/lib/ValueConversions_cpp.template
+++ b/deps/v8/third_party/inspector_protocol/lib/ValueConversions_cpp.template
@@ -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;
}
diff --git a/deps/v8/third_party/inspector_protocol/lib/base_string_adapter_cc.template b/deps/v8/third_party/inspector_protocol/lib/base_string_adapter_cc.template
index e503f5c23e..10488f2243 100644
--- a/deps/v8/third_party/inspector_protocol/lib/base_string_adapter_cc.template
+++ b/deps/v8/third_party/inspector_protocol/lib/base_string_adapter_cc.template
@@ -11,7 +11,6 @@
#include "base/base64.h"
#include "base/json/json_reader.h"
#include "base/memory/ptr_util.h"
-#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -141,7 +140,7 @@ std::unique_ptr<base::Value> toBaseValue(Value* value, int depth) {
// static
String StringUtil::fromUTF16LE(const uint16_t* data, size_t length) {
std::string utf8;
- base::UTF16ToUTF8(reinterpret_cast<const base::char16*>(data), length, &utf8);
+ base::UTF16ToUTF8(reinterpret_cast<const char16_t*>(data), length, &utf8);
return utf8;
}
@@ -246,4 +245,4 @@ void ProtocolTypeTraits<Binary>::Serialize(const Binary& value, std::vector<uint
value.AppendSerialized(bytes);
}
-} // namespace {{config.crdtp.namespace}} \ No newline at end of file
+} // namespace {{config.crdtp.namespace}}