Backed out changeset 41d43f5c48c2 (bug 1736508) for causing mochitest failures on test_tcpsocket_jsm.html. CLOSED TREE
authorMarian-Vasile Laza <mlaza@mozilla.com>
Tue, 19 Oct 2021 15:49:09 +0300
changeset 596334 d1a81286baea90974e6c22c8c61d1a4e6d5b258a
parent 596333 bd1c7b8ca4da390400227de1f81a77d53f411573
child 596335 329de07e7a961067363ab88f789bf3652c037d6a
push id38894
push usermlaza@mozilla.com
push dateTue, 19 Oct 2021 15:45:06 +0000
treeherdermozilla-central@329de07e7a96 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1736508
milestone95.0a1
backs out41d43f5c48c2bec05f52e062e29cb179391a495b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 41d43f5c48c2 (bug 1736508) for causing mochitest failures on test_tcpsocket_jsm.html. CLOSED TREE
dom/network/TCPSocket.cpp
dom/network/tests/test_tcpsocket_client_and_server_basics.js
--- a/dom/network/TCPSocket.cpp
+++ b/dom/network/TCPSocket.cpp
@@ -888,22 +888,19 @@ nsresult TCPSocket::ResolveProxy() {
   nsCOMPtr<nsIProtocolProxyService> pps =
       do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &rv);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   nsCOMPtr<nsIURI> uri;
   nsCString spec = mSsl ? "https://"_ns : "http://"_ns;
-  bool maybeIPv6 = mHost.FindChar(':') != -1;
-  if (maybeIPv6) spec.Append('[');
   if (!AppendUTF16toUTF8(mHost, spec, fallible)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
-  if (maybeIPv6) spec.Append(']');
   rv = NS_MutateURI(NS_STANDARDURLMUTATOR_CONTRACTID)
            .SetSpec(spec)
            .SetPort(mPort)
            .Finalize(uri);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
--- a/dom/network/tests/test_tcpsocket_client_and_server_basics.js
+++ b/dom/network/tests/test_tcpsocket_client_and_server_basics.js
@@ -584,31 +584,8 @@ async function test_basics() {
       clientSocket.readyState,
       "closed",
       "client readyState should be closed after the failure to connect"
     );
   }
 }
 
 add_task(test_basics);
-
-/**
- * Test that TCPSocket works with ipv6 address.
- */
-add_task(async function test_ipv6() {
-  const { HttpServer } = ChromeUtils.import(
-    "resource://testing-common/httpd.js"
-  );
-  let deferred = defer();
-  let serverPort = 8086;
-  let httpServer = new HttpServer();
-  httpServer.start_ipv6(serverPort);
-  let clientSocket = new TCPSocket("::1", serverPort);
-  clientSocket.onopen = () => {
-    ok(true, "Connect to ipv6 address succeeded");
-    deferred.resolve();
-  };
-  clientSocket.onerror = () => {
-    ok(false, "Connect to ipv6 address failed");
-    deferred.reject();
-  };
-  return deferred.promise;
-});