Version 1.25.0-dev.2.1
Cherry-pick 092cbd561de8c5184481af744f087d2079b50234 into dev
diff --git a/runtime/bin/vmservice_dartium.cc b/runtime/bin/vmservice_dartium.cc
index c0e6f78..2b674d2 100644
--- a/runtime/bin/vmservice_dartium.cc
+++ b/runtime/bin/vmservice_dartium.cc
@@ -24,10 +24,17 @@
return 0; \
}
-
-static const char* DEFAULT_VM_SERVICE_SERVER_IP = "127.0.0.1";
+static const char* DART_IPV6_ONLY_FLAG = "DART_IPV6_ONLY";
+static const char* DEFAULT_VM_SERVICE_SERVER_IP_V6 = "::1";
+static const char* DEFAULT_VM_SERVICE_SERVER_IP_V4 = "127.0.0.1";
static const int DEFAULT_VM_SERVICE_SERVER_PORT = 0;
+static bool IsIpv6Only() {
+ char* v = getenv(DART_IPV6_ONLY_FLAG);
+ if (!v) return 0;
+ return v[0] == '1';
+}
+
void VmServiceServer::Bootstrap() {
if (!Platform::Initialize()) {
fprintf(stderr, "Platform::Initialize() failed\n");
@@ -59,7 +66,9 @@
ASSERT(Dart_IsServiceIsolate(isolate));
if (!VmService::Setup(
- DEFAULT_VM_SERVICE_SERVER_IP, DEFAULT_VM_SERVICE_SERVER_PORT,
+ IsIpv6Only() ? DEFAULT_VM_SERVICE_SERVER_IP_V6 :
+ DEFAULT_VM_SERVICE_SERVER_IP_V4,
+ DEFAULT_VM_SERVICE_SERVER_PORT,
false /* running_precompiled */, false /* disable origin checks */,
false /* trace_loading */)) {
fprintf(stderr, "Vmservice::Setup failed: %s\n",
diff --git a/tools/VERSION b/tools/VERSION
index 1988e4e..69cd40c 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 25
PATCH 0
PRERELEASE 2
-PRERELEASE_PATCH 0
+PRERELEASE_PATCH 1