Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Unified Diff: Source/modules/websockets/NewWebSocketChannelImpl.cpp

Issue 419203004: DevTools: wrapping arguments addConsoleMessage in ConsoleMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@wrap-not-all-console-args
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/websockets/NewWebSocketChannelImpl.cpp
diff --git a/Source/modules/websockets/NewWebSocketChannelImpl.cpp b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
index a2569b6905bb77b419747e77df461ae3de96e4fc..1bfa5cfe92499e5d3133ba5c485cdba068c9bc14 100644
--- a/Source/modules/websockets/NewWebSocketChannelImpl.cpp
+++ b/Source/modules/websockets/NewWebSocketChannelImpl.cpp
@@ -36,6 +36,7 @@
#include "core/fileapi/FileReaderLoader.h"
#include "core/fileapi/FileReaderLoaderClient.h"
#include "core/frame/LocalFrame.h"
+#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InspectorTraceEvents.h"
#include "core/loader/FrameLoader.h"
@@ -140,7 +141,7 @@ bool NewWebSocketChannelImpl::connect(const KURL& url, const String& protocol)
}
if (MixedContentChecker::isMixedContent(document()->securityOrigin(), url)) {
String message = "Connecting to a non-secure WebSocket server from a secure origin is deprecated.";
- document()->addConsoleMessage(JSMessageSource, WarningMessageLevel, message);
+ document()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message));
}
m_url = url;
@@ -243,7 +244,7 @@ void NewWebSocketChannelImpl::fail(const String& reason, MessageLevel level, con
if (m_identifier)
InspectorInstrumentation::didReceiveWebSocketFrameError(document(), m_identifier, reason);
const String message = "WebSocket connection to '" + m_url.elidedString() + "' failed: " + reason;
- executionContext()->addConsoleMessage(JSMessageSource, level, message, sourceURL, lineNumber);
+ executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, level, message, sourceURL, lineNumber));
if (m_client)
m_client->didReceiveMessageError();
« no previous file with comments | « Source/modules/websockets/MainThreadWebSocketChannel.cpp ('k') | Source/web/ServiceWorkerGlobalScopeProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698