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

Unified Diff: third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl

Issue 1029113005: Update mojo sdk to rev cb6c5abfadfea0ca73dca466e2894554ac1ae144 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 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: third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
index cca521d4e48342ca492307f6e20326a9f68f4660..30463b2b6a096c625bf883ae52b29538ece8078f 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
+++ b/third_party/mojo/src/mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl
@@ -63,7 +63,11 @@ class {{interface|name}}ProxyImpl extends bindings.Proxy {
throw 'Expected a message with a valid request Id.';
}
Completer c = completerMap[message.header.requestId];
- completerMap[message.header.requestId] = null;
+ if (c == null) {
+ throw 'Message had unknown request Id: ${message.header.requestId}';
+ }
+ completerMap.remove(message.header.requestId);
+ assert(!c.isCompleted);
c.complete(r);
break;
{%- endif %}
@@ -154,7 +158,7 @@ class {{interface|name}}Proxy implements bindings.ProxyBase {
core.MojoMessagePipeEndpoint endpoint) =>
new {{interface|name}}Proxy.fromEndpoint(endpoint);
- Future close() => impl.close();
+ Future close({bool nodefer: false}) => impl.close(nodefer: nodefer);
String toString() {
return "{{interface|name}}Proxy($impl)";

Powered by Google App Engine
This is Rietveld 408576698