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

Unified Diff: mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl

Issue 1405103002: Dart: Merge message pipe query and read into one native call. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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/public/dart/mojo/sdk_ext/src/natives.dart ('k') | 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/dart_templates/struct_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl b/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
index 95ec615bf14463aae5b0db1132babaf97c00c43b..1818e4af71f117640c53e4f3622135cd42f787d5 100644
--- a/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/dart_templates/struct_definition.tmpl
@@ -31,7 +31,9 @@ class {{struct|name}} extends bindings.Struct {
static {{struct|name}} deserialize(bindings.Message message) {
var decoder = new bindings.Decoder(message);
var result = decode(decoder);
- decoder.excessHandles.forEach((h) => h.close());
+ if (decoder.excessHandles != null) {
+ decoder.excessHandles.forEach((h) => h.close());
+ }
return result;
}
« no previous file with comments | « mojo/public/dart/mojo/sdk_ext/src/natives.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698