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

Unified Diff: runtime/bin/eventhandler_linux.h

Issue 9029001: Add close to input stream and cleanup socket and streams (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments by ager@ Created 8 years, 12 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/eventhandler_linux.h
diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h
index 219ff4e27263581da204ccf1460c41b91ed1a0e1..9cbb124428ba5251308335a2e84e8e605ab0003c 100644
--- a/runtime/bin/eventhandler_linux.h
+++ b/runtime/bin/eventhandler_linux.h
@@ -46,7 +46,7 @@ class SocketData {
Unregister();
flags_ = 0;
close(fd_);
- fd_ = 0;
+ fd_ = -1;
}
bool IsListeningSocket() { return (mask_ & (1 << kListeningSocket)) != 0; }
@@ -60,6 +60,7 @@ class SocketData {
bool HasPollEvents() { return mask_ != 0; }
void SetPortAndMask(Dart_Port port, intptr_t mask) {
+ ASSERT(fd_ != -1);
port_ = port;
mask_ = mask;
}
« 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