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

Unified Diff: runtime/bin/socket.cc

Issue 2205913003: Better error-message when bind fails. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add android support. Created 4 years, 4 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 | « runtime/bin/socket.h ('k') | runtime/bin/socket_android.cc » ('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 7b6f95ae27bbc77e241081786653580c97eae202..745306d0e53aef80dffdde95f79f249bda1bfe4d 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -234,6 +234,12 @@ void FUNCTION_NAME(Socket_CreateBindConnect)(Dart_NativeArguments args) {
}
}
+void FUNCTION_NAME(Socket_IsBindError)(Dart_NativeArguments args) {
+ intptr_t error_number =
+ DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1));
+ bool is_bind_error = Socket::IsBindError(error_number);
+ Dart_SetReturnValue(args, is_bind_error ? Dart_True() : Dart_False());
+}
void FUNCTION_NAME(Socket_CreateBindDatagram)(Dart_NativeArguments args) {
RawAddr addr;
« no previous file with comments | « runtime/bin/socket.h ('k') | runtime/bin/socket_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698