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

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

Issue 12385024: Make sure that no decrypted text gets stuck in the plaintext buffer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tests/standalone/standalone.status » ('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 c9d46de6a01a3892116788fd53dd0d137768e242..62ecb4d6e427e196dc17c55f235d69d4b065c6e4 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -404,11 +404,12 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
void set readEventsEnabled(bool value) {
_readEventsEnabled = value;
- if (_socketClosedRead) {
- if (value) {
- // We have no underlying socket to set off read events.
- Timer.run(_readHandler);
- }
+ if (value &&
+ ((_secureFilter != null &&
+ _secureFilter.buffers[READ_PLAINTEXT].length > 0) ||
+ _socketClosedRead)) {
+ // We might not have no underlying socket to set off read events.
+ Timer.run(_readHandler);
}
}
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698