Index: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp |
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp |
index 1c16de25e2536b3649da41ccb60c675d3e7961b9..e72d44ef805ad8e8133093c413fa48f65abda5ed 100644 |
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp |
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp |
@@ -134,7 +134,7 @@ void DocumentWebSocketChannel::BlobLoader::didFail(FileError::ErrorCode errorCod |
// |this| is deleted here. |
} |
-DocumentWebSocketChannel::DocumentWebSocketChannel(Document* document, WebSocketChannelClient* client, const String& sourceURL, unsigned lineNumber, WebSocketHandle *handle) |
+DocumentWebSocketChannel::DocumentWebSocketChannel(Document* document, WebSocketChannelClient* client, PassOwnPtr<SourceLocation> location, WebSocketHandle *handle) |
: ContextLifecycleObserver(document) |
, m_handle(adoptPtr(handle ? handle : Platform::current()->createWebSocketHandle())) |
, m_client(client) |
@@ -142,8 +142,7 @@ DocumentWebSocketChannel::DocumentWebSocketChannel(Document* document, WebSocket |
, m_sendingQuota(0) |
, m_receivedDataSizeForFlowControl(receivedDataSizeForFlowControlHighWaterMark * 2) // initial quota |
, m_sentSizeOfTopMessage(0) |
- , m_sourceURLAtConstruction(sourceURL) |
- , m_lineNumberAtConstruction(lineNumber) |
+ , m_locationAtConstruction(std::move(location)) |
{ |
} |
@@ -256,14 +255,14 @@ void DocumentWebSocketChannel::close(int code, const String& reason) |
processSendQueue(); |
} |
-void DocumentWebSocketChannel::fail(const String& reason, MessageLevel level, const String& sourceURL, unsigned lineNumber) |
+void DocumentWebSocketChannel::fail(const String& reason, MessageLevel level, PassOwnPtr<SourceLocation> location) |
{ |
WTF_LOG(Network, "DocumentWebSocketChannel %p fail(%s)", this, reason.utf8().data()); |
// m_handle and m_client can be null here. |
InspectorInstrumentation::didReceiveWebSocketFrameError(document(), m_identifier, reason); |
const String message = "WebSocket connection to '" + m_url.elidedString() + "' failed: " + reason; |
- getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, level, message, sourceURL, lineNumber, 0)); |
+ getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, level, message, std::move(location))); |
if (m_client) |
m_client->didError(); |