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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl

Issue 2803023005: Switch base::Value typemapping to be by value instead of by unique_ptr.
Patch Set: Created 3 years, 8 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
« no previous file with comments | « mojo/common/values_struct_traits.cc ('k') | services/preferences/persistent_pref_store_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
index 96e0d614d8ef59f635fb44f478bca29586b0dab5..25d245d10c99909177de7c98ed271453f423f11f 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_data_view_declaration.tmpl
@@ -28,6 +28,9 @@ class {{struct.name}}DataView {
{%- else %}
auto* pointer = &data_->{{name}};
{%- endif %}
+ if (pointer && pointer->is_null())
+ pointer = nullptr;
+
return mojo::internal::Deserialize<{{kind|unmapped_type_for_serializer}}>(
pointer, output, context_);
}
« no previous file with comments | « mojo/common/values_struct_traits.cc ('k') | services/preferences/persistent_pref_store_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698