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

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

Issue 2084703002: mojo: Re-allow empty callbacks to be passed to the 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d723447cf29ae697162e65bf13fafa6e93d1ab4..32b0a44e7667351ec3d2c7f353a2424b8422d549 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl
@@ -145,7 +145,8 @@ bool {{class_name}}_{{method.name}}_ForwardToCallback::Accept(
{{alloc_params(method.response_param_struct, "params", "message",
"&serialization_context_",
"{{class_name}}_{{method.name}} response")}}
- callback_.Run({{pass_params(method.response_parameters)}});
+ if (!callback_.is_null())
+ callback_.Run({{pass_params(method.response_parameters)}});
return true;
}
{%- endif %}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698