Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Unified Diff: mojo/public/cpp/bindings/lib/map_serialization.h

Issue 2034273002: Mojo C++ bindings: introduce mojo::WTFMap for blink bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/cpp/bindings/lib/map_serialization.h
diff --git a/mojo/public/cpp/bindings/lib/map_serialization.h b/mojo/public/cpp/bindings/lib/map_serialization.h
index 91e404e478abe9518e6790da88073fa4c70cc4c1..e7dc2b0681364ea84166686ca38342f4c7a16db8 100644
--- a/mojo/public/cpp/bindings/lib/map_serialization.h
+++ b/mojo/public/cpp/bindings/lib/map_serialization.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_
#include <type_traits>
+#include <vector>
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/lib/array_serialization.h"
@@ -84,11 +85,11 @@ struct Serializer<Map<Key, Value>, MaybeConstUserType> {
using UserValue = typename Traits::Value;
using Data = typename Map<Key, Value>::Data_;
using KeyArraySerializer = ArraySerializer<Array<Key>,
- Array<UserKey>,
+ std::vector<UserKey>,
MapKeyReader<MaybeConstUserType>>;
using ValueArraySerializer =
ArraySerializer<Array<Value>,
- Array<UserValue>,
+ std::vector<UserValue>,
MapValueReader<MaybeConstUserType>>;
static size_t PrepareToSerialize(MaybeConstUserType& input,
@@ -150,8 +151,8 @@ struct Serializer<Map<Key, Value>, MaybeConstUserType> {
if (!input)
return CallSetToNullIfExists<Traits>(output);
- Array<UserKey> keys;
- Array<UserValue> values;
+ std::vector<UserKey> keys;
+ std::vector<UserValue> values;
if (!KeyArraySerializer::DeserializeElements(input->keys.ptr, &keys,
context) ||

Powered by Google App Engine
This is Rietveld 408576698