diff options
Diffstat (limited to 'WebCore/websockets/WebSocketChannel.cpp')
-rw-r--r-- | WebCore/websockets/WebSocketChannel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/websockets/WebSocketChannel.cpp b/WebCore/websockets/WebSocketChannel.cpp index 5ce1cc3..45bb206 100644 --- a/WebCore/websockets/WebSocketChannel.cpp +++ b/WebCore/websockets/WebSocketChannel.cpp @@ -48,6 +48,7 @@ #include "WebSocketHandshake.h" #include <wtf/text/CString.h> +#include <wtf/text/StringConcatenate.h> #include <wtf/text/StringHash.h> #include <wtf/Deque.h> #include <wtf/FastMalloc.h> @@ -157,7 +158,7 @@ void WebSocketChannel::didOpen(SocketStreamHandle* handle) if (InspectorController* controller = m_context->inspectorController()) controller->willSendWebSocketHandshakeRequest(identifier(), m_handshake.clientHandshakeRequest()); #endif - const CString& handshakeMessage = m_handshake.clientHandshakeMessage(); + CString handshakeMessage = m_handshake.clientHandshakeMessage(); if (!handle->send(handshakeMessage.data(), handshakeMessage.length())) { m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, "Error sending handshake message.", 0, m_handshake.clientOrigin()); handle->close(); @@ -246,7 +247,7 @@ bool WebSocketChannel::appendToBuffer(const char* data, size_t len) m_bufferSize = newBufferSize; return true; } - m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, String::format("WebSocket frame (at %lu bytes) is too long.", static_cast<unsigned long>(newBufferSize)), 0, m_handshake.clientOrigin()); + m_context->addMessage(JSMessageSource, LogMessageType, ErrorMessageLevel, makeString("WebSocket frame (at ", String::number(static_cast<unsigned long>(newBufferSize)), " bytes) is too long."), 0, m_handshake.clientOrigin()); return false; } |