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

Unified Diff: mojo/public/dart/mojo/lib/src/handle.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: Format 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
Index: mojo/public/dart/mojo/lib/src/handle.dart
diff --git a/mojo/public/dart/mojo/lib/src/handle.dart b/mojo/public/dart/mojo/lib/src/handle.dart
index 391fa841b62e409b5e0eaac4d8851bbf794037b8..5a3357ce7d0b7872e225419d1e985fb3d0b0c2f6 100644
--- a/mojo/public/dart/mojo/lib/src/handle.dart
+++ b/mojo/public/dart/mojo/lib/src/handle.dart
@@ -20,6 +20,7 @@ class MojoHandle {
MojoHandle(this._h, {String description}) {
assert(_addUnclosedHandle(this, description: description));
+ MojoHandleNatives.addUnclosed(_h);
}
MojoHandle._internal(this._h);
@@ -28,6 +29,7 @@ class MojoHandle {
MojoResult close() {
assert(_removeUnclosedHandle(this));
+ MojoHandleNatives.removeUnclosed(_h);
int result = MojoHandleNatives.close(_h);
_h = INVALID;
return new MojoResult(result);
@@ -35,6 +37,7 @@ class MojoHandle {
MojoHandle pass() {
assert(_removeUnclosedHandle(this));
+ MojoHandleNatives.removeUnclosed(_h);
return this;
}
@@ -87,9 +90,9 @@ class MojoHandle {
return new MojoWaitManyResult(new MojoResult(result[0]), result[1], states);
}
- static MojoResult register(MojoEventStream eventStream) {
- return new MojoResult(
- MojoHandleNatives.register(eventStream, eventStream._handle.h));
+ static MojoResult registerFinalizer(MojoEventStream eventStream) {
+ return new MojoResult(MojoHandleNatives.registerFinalizer(
+ eventStream, eventStream._handle.h));
}
static HashMap<int, _HandleCreationRecord> _unclosedHandles = new HashMap();
@@ -104,8 +107,8 @@ class MojoHandle {
stack = s;
}
- var handleCreate = new _HandleCreationRecord(
- handle, stack, description: description);
+ var handleCreate =
+ new _HandleCreationRecord(handle, stack, description: description);
_unclosedHandles[handle.h] = handleCreate;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698