Make absl::string_view to std::string conversion explicit in Masque. This is to unblock merge, because current code does not compile on Chromium. It makes sense for this conversion not to happen implicitly, given that it involves copying data and potentially an allocation, which can be expensive. Not sure why it compiles in Google3. Note that there has recently been a similar, merge-blocking string_view-related issue: https://quiche.googlesource.com/quiche/+/9f5ac0fb08fe7e7bd4689c682667b2434bb8960a PiperOrigin-RevId: 359856329 Change-Id: Ib5593d7e8d26cdf2501b86e90e359c7ba3775ba2
diff --git a/quic/masque/masque_server_backend.cc b/quic/masque/masque_server_backend.cc index 230f7e7..5b10d6f 100644 --- a/quic/masque/masque_server_backend.cc +++ b/quic/masque/masque_server_backend.cc
@@ -55,7 +55,7 @@ // This request is not a MASQUE path. return false; } - masque_path = path.substr(sizeof("/.well-known/masque/") - 1); + masque_path = std::string(path.substr(sizeof("/.well-known/masque/") - 1)); } else { if (method != "CONNECT-UDP") { // Unexpected method.