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

Unified Diff: runtime/bin/chunked_stream.dart

Issue 9474004: Make FileInputStream and FileOutputStream actually asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 | « no previous file | runtime/bin/file.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/chunked_stream.dart
diff --git a/runtime/bin/chunked_stream.dart b/runtime/bin/chunked_stream.dart
index 8b1e8a1804ff5c4a179b03dd01d0e4b58c664075..d2c66cd3e2cbf130e8d6fd7b215cadb1060ab794 100644
--- a/runtime/bin/chunked_stream.dart
+++ b/runtime/bin/chunked_stream.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -110,7 +110,7 @@ class _ChunkedInputStream implements ChunkedInputStream {
}
// Schedule data callback if enough data in buffer.
- if ((_bufferList.length >=_chunkSize ||
+ if ((_bufferList.length >= _chunkSize ||
(_bufferList.length > 0 && _inputClosed)) &&
_clientDataHandler !== null &&
_scheduledDataCallback == null) {
@@ -122,6 +122,9 @@ class _ChunkedInputStream implements ChunkedInputStream {
_inputClosed &&
!_closed &&
_scheduledCloseCallback == null) {
+ if (_scheduledDataCallback != null) {
+ _scheduledDataCallback.cancel();
+ }
_scheduledCloseCallback = new Timer(issueCloseCallback, 0);
}
}
« no previous file with comments | « no previous file | runtime/bin/file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698