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

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

Issue 703273002: Update mojo sdk to rev 04a510fb37db10642e156957f9b2c11c2f6442ac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content/child -> mojo/common linking Created 6 years, 1 month 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/tools/bindings/generators/cpp_templates/interface_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
index afdaf1ae801eb4335026cf6dbcaef67c9734c50a..fdbe8ca0df4665ee89ea5b902c127e2873d9e1e8 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
@@ -230,6 +230,9 @@ bool {{class_name}}Stub::Accept(mojo::Message* message) {
params->DecodePointersAndHandles(message->mutable_handles());
{{alloc_params(method.parameters)|indent(6)}}
+ // A null |sink_| typically means there is a missing call to
+ // InterfacePtr::set_client().
+ assert(sink_);
sink_->{{method.name}}({{pass_params(method.parameters)}});
return true;
{%- else %}
@@ -259,6 +262,9 @@ bool {{class_name}}Stub::AcceptWithResponder(
message->request_id(), responder);
{{interface_macros.declare_callback(method)}} callback(runnable);
{{alloc_params(method.parameters)|indent(6)}}
+ // A null |sink_| typically means there is a missing call to
+ // InterfacePtr::set_client().
+ assert(sink_);
sink_->{{method.name}}(
{%- if method.parameters -%}{{pass_params(method.parameters)}}, {% endif -%}callback);
return true;
@@ -305,6 +311,9 @@ bool {{class_name}}RequestValidator::Accept(mojo::Message* message) {
}
{%- endif %}
+ // A null |sink_| typically means there is a missing call to
+ // InterfacePtr::set_client().
+ assert(sink_);
return sink_->Accept(message);
}
@@ -334,6 +343,9 @@ bool {{class_name}}ResponseValidator::Accept(mojo::Message* message) {
}
{%- endif %}
+ // A null |sink_| typically means there is a missing call to
+ // InterfacePtr::set_client().
+ assert(sink_);
return sink_->Accept(message);
}
{%- endif -%}

Powered by Google App Engine
This is Rietveld 408576698