diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc index a1622433301989..50a4bec3fd6c41 100644 --- a/src/inspector/main_thread_interface.cc +++ b/src/inspector/main_thread_interface.cc @@ -289,7 +289,7 @@ Deletable* MainThreadInterface::GetObjectIfExists(int id) { return iterator->second.get(); } -std::unique_ptr Utf8ToStringView(const std::string& message) { +std::unique_ptr Utf8ToStringView(const std::string_view message) { size_t expected_u16_length = simdutf::utf16_length_from_utf8(message.data(), message.length()); char16_t buffer[expected_u16_length]; diff --git a/src/inspector/main_thread_interface.h b/src/inspector/main_thread_interface.h index 3ec5b3db3e1600..71989db3bcacb9 100644 --- a/src/inspector/main_thread_interface.h +++ b/src/inspector/main_thread_interface.h @@ -34,7 +34,7 @@ class Deletable { }; std::unique_ptr Utf8ToStringView( - const std::string& message); + const std::string_view message); using MessageQueue = std::deque>;