Index: net/socket/ssl_client_socket_nss.cc |
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc |
index 3a8b39e678c2785ea4d6fd7c60fea762fb599883..9f40a78371e2277821ba96c173ee2e3aa316aaf8 100644 |
--- a/net/socket/ssl_client_socket_nss.cc |
+++ b/net/socket/ssl_client_socket_nss.cc |
@@ -2143,7 +2143,12 @@ int SSLClientSocketNSS::Core::BufferSend() { |
const char* buf1; |
const char* buf2; |
unsigned int len1, len2; |
- memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, &len2); |
+ if (memio_GetWriteParams(nss_bufs_, &buf1, &len1, &buf2, &len2)) { |
+ // It is important this return synchronously to prevent spinning infinitely |
+ // in the off-thread NSS case. The error code itself is ignored, so just |
+ // return ERR_ABORTED. See https://crbug.com/381160. |
+ return ERR_ABORTED; |
+ } |
const unsigned int len = len1 + len2; |
int rv = 0; |