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

Unified Diff: runtime/bin/socket.cc

Issue 638303002: Don't create unused OSError in Socket_Available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | runtime/bin/socket_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index cbef2bacfc8b63ad1651dedaa61f8c35262f3d6c..dcacf6ac34b1bb42783b03a8e1978a324dbdf84a 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -83,7 +83,9 @@ void FUNCTION_NAME(Socket_Available)(Dart_NativeArguments args) {
if (available >= 0) {
Dart_SetReturnValue(args, Dart_NewInteger(available));
} else {
- Dart_SetReturnValue(args, DartUtils::NewDartOSError());
+ // Available failed. Mark socket as having data, to trigger a future read
+ // event where the actual error can be reported.
+ Dart_SetReturnValue(args, Dart_NewInteger(1));
}
}
« no previous file with comments | « no previous file | runtime/bin/socket_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698