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

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

Issue 2744963002: Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and (Closed)
Patch Set: Add binding.html layout test for connection error with reason. Reset IEC when reset() or close()… Created 3 years, 9 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/tools/bindings/generators/js_templates/interface_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
index 54e2d4ebcf187e68193c57d78a565f0a1e06c97d..11e319c1f7c819840a6f2a323f1021f2acacce8f 100644
--- a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl
@@ -93,7 +93,7 @@
{%- if method.response_parameters != None %}
case k{{interface.name}}_{{method.name}}_Name:
var params = reader.decodeStruct({{interface.name}}_{{method.name}}_Params);
- return this.{{method.name|stylize_method}}(
+ this.{{method.name|stylize_method}}(
{%- for parameter in method.parameters -%}
params.{{parameter.name}}{% if not loop.last %}, {% endif -%}
{%- endfor %}).then(function(response) {
@@ -111,10 +111,11 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif -%}
var message = builder.finish();
responder.accept(message);
});
+ return true;
{%- endif %}
{%- endfor %}
default:
- return Promise.reject(Error("Unhandled message: " + reader.messageName));
+ return false;
}
};

Powered by Google App Engine
This is Rietveld 408576698