| Index: mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
|
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
|
| index cb2ee3834be8471455aeb47e86babd1c3ebd88eb..f6779d3467cedaa26463ea86c1e8058601ad73f3 100644
|
| --- a/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
|
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/union_serialization_declaration.tmpl
|
| @@ -2,7 +2,8 @@
|
| {%- set data_type = union|get_qualified_name_for_kind(internal=True) %}
|
|
|
| template <>
|
| -struct {{export_attribute}} UnionTraits<{{mojom_type}}, {{mojom_type}}Ptr> {
|
| +struct {{export_attribute}} UnionTraits<{{mojom_type}}::DataView,
|
| + {{mojom_type}}Ptr> {
|
| static bool IsNull(const {{mojom_type}}Ptr& input) { return !input; }
|
| static void SetToNull({{mojom_type}}Ptr* output) { output->reset(); }
|
|
|
| @@ -26,7 +27,7 @@ struct {{export_attribute}} UnionTraits<{{mojom_type}}, {{mojom_type}}Ptr> {
|
| {%- endif %}
|
| {%- endfor %}
|
|
|
| - static bool Read({{mojom_type}}DataView input, {{mojom_type}}Ptr* output);
|
| + static bool Read({{mojom_type}}::DataView input, {{mojom_type}}Ptr* output);
|
| };
|
|
|
| namespace internal {
|
| @@ -34,7 +35,7 @@ namespace internal {
|
| template <typename MaybeConstUserType>
|
| struct Serializer<{{mojom_type}}Ptr, MaybeConstUserType> {
|
| using UserType = typename std::remove_const<MaybeConstUserType>::type;
|
| - using Traits = UnionTraits<{{mojom_type}}, UserType>;
|
| + using Traits = UnionTraits<{{mojom_type}}::DataView, UserType>;
|
|
|
| static size_t PrepareToSerialize(MaybeConstUserType& input,
|
| bool inlined,
|
| @@ -161,7 +162,7 @@ struct Serializer<{{mojom_type}}Ptr, MaybeConstUserType> {
|
| if (!input || input->is_null())
|
| return CallSetToNullIfExists<Traits>(output);
|
|
|
| - {{mojom_type}}DataView data_view(input, context);
|
| + {{mojom_type}}::DataView data_view(input, context);
|
| return Traits::Read(data_view, output);
|
| }
|
| };
|
|
|