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

Unified Diff: sdk/lib/io/secure_socket.dart

Issue 12213092: Rework Timer interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 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 | « sdk/lib/io/list_stream_impl.dart ('k') | sdk/lib/io/socket_stream_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/secure_socket.dart
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index bf449713737b79688d412c02e2fb10586102eb39..6dc1d6dcb9a1b45d0cabd2e5ef73085a3f57da87 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -589,7 +589,7 @@ class _SecureSocket implements SecureSocket {
scheduledDataEvent = null;
}
} else if (scheduledDataEvent == null) {
- scheduledDataEvent = new Timer(0, (_) => _secureDataHandler());
+ scheduledDataEvent = Timer.run(_secureDataHandler);
}
if (_socketClosedRead) { // An onClose event is pending.
@@ -603,7 +603,7 @@ class _SecureSocket implements SecureSocket {
if (_filterReadEmpty) {
// This can't be an else clause: the value of _filterReadEmpty changes.
// This must be asynchronous, because we are in a read or readList call.
- new Timer(0, (_) => _secureCloseHandler());
+ Timer.run(_secureCloseHandler);
}
}
}
« no previous file with comments | « sdk/lib/io/list_stream_impl.dart ('k') | sdk/lib/io/socket_stream_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698