diff --git a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp index 1a0cd1de5078..8c4e0e378f11 100644 --- a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp +++ b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp @@ -246,7 +246,7 @@ void WebSocketTask::sendString(std::span utf8, CompletionHandler< GRefPtr bytes = adoptGRef(g_bytes_new_static(utf8.data(), utf8.size())); soup_websocket_connection_send_message(m_connection.get(), SOUP_WEBSOCKET_DATA_TEXT, bytes.get()); #else - soup_websocket_connection_send_text(m_connection.get(), CString(reinterpret_cast(utf8.data()), utf8.size()).data()); + soup_websocket_connection_send_text(m_connection.get(), CString(utf8).data()); #endif } callback(); diff --git a/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp b/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp index 89382a72d9c1..60f5fdedf0e0 100644 --- a/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp +++ b/Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorHTTPServer.cpp @@ -156,7 +156,7 @@ void RemoteInspectorHTTPServer::sendMessageToFrontend(uint64_t connectionID, uin GRefPtr bytes = adoptGRef(g_bytes_new_static(utf8.data(), utf8.length())); soup_websocket_connection_send_message(webSocketConnection, SOUP_WEBSOCKET_DATA_TEXT, bytes.get()); #else - soup_websocket_connection_send_text(webSocketConnection, CString(reinterpret_cast(utf8.data()), utf8.length()).data()); + soup_websocket_connection_send_text(webSocketConnection, CString(utf8).data()); #endif }