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

Unified Diff: mojo/public/dart/mojo/lib/src/event_stream.dart

Issue 1411843005: Dart: Removes C++ set for closing handles on an unhandled exception. (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/dart/test/unhandled_exception_test.dart ('k') | mojo/public/dart/mojo/lib/src/handle.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/mojo/lib/src/event_stream.dart
diff --git a/mojo/public/dart/mojo/lib/src/event_stream.dart b/mojo/public/dart/mojo/lib/src/event_stream.dart
index 095564a9a4ebed0d70c594038984c8b537baeba5..c56e1ad4f54c1ef41651f6e1a2f3e16e7a0d8df6 100644
--- a/mojo/public/dart/mojo/lib/src/event_stream.dart
+++ b/mojo/public/dart/mojo/lib/src/event_stream.dart
@@ -31,7 +31,7 @@ class MojoEventStream extends Stream<List<int>> {
: _handle = handle,
_signals = signals,
_isListening = false {
- MojoResult result = MojoHandle.register(this);
+ MojoResult result = MojoHandle.registerFinalizer(this);
if (!result.isOk) {
throw "Failed to register the MojoHandle: $result.";
}
@@ -98,6 +98,7 @@ class MojoEventStream extends Stream<List<int>> {
Future _handleWatcherClose({bool immediate: false}) {
assert(_handle != null);
assert(MojoHandle._removeUnclosedHandle(_handle));
+ MojoHandleNatives.removeUnclosed(_handle.h);
return MojoHandleWatcher.close(_handle.h, wait: !immediate).then((r) {
if (_receivePort != null) {
_receivePort.close();
« no previous file with comments | « mojo/dart/test/unhandled_exception_test.dart ('k') | mojo/public/dart/mojo/lib/src/handle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698