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

Unified Diff: mojo/public/dart/src/codec.dart

Issue 996923003: Dart: Better handle leak checks. close() is async. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge 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
« no previous file with comments | « mojo/public/dart/src/application_connection.dart ('k') | mojo/public/dart/src/event_stream.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/src/codec.dart
diff --git a/mojo/public/dart/src/codec.dart b/mojo/public/dart/src/codec.dart
index 29da473c51db2200d20b6786b6ddf8f2bf824a70..2c14e0eb5b075bea31ae36b2e4b03fa3c2b6f914 100644
--- a/mojo/public/dart/src/codec.dart
+++ b/mojo/public/dart/src/codec.dart
@@ -180,7 +180,7 @@ class Encoder {
encodeInvalideHandle(offset, nullable);
} else {
encodeUint32(_buffer.handles.length, offset);
- _buffer.handles.add(value);
+ _buffer.handles.add(value.pass());
}
}
@@ -565,7 +565,7 @@ class Decoder {
throw new MojoCodecError(
'Trying to decode an invalid handle from a non-nullable type.');
}
- return new core.MojoHandle(core.MojoHandle.INVALID);
+ return new core.MojoHandle.invalid();
}
_validator.claimHandle(index);
return _handles[index];
« no previous file with comments | « mojo/public/dart/src/application_connection.dart ('k') | mojo/public/dart/src/event_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698