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

Unified Diff: Source/core/page/EventSource.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/core/page/EventSource.cpp
diff --git a/Source/core/page/EventSource.cpp b/Source/core/page/EventSource.cpp
index 1081f22c5e5d40f629de2b6a32d7b2a469623fab..b6b832c8067f4d36af649dd30aa04488c5593a88 100644
--- a/Source/core/page/EventSource.cpp
+++ b/Source/core/page/EventSource.cpp
@@ -46,6 +46,7 @@
#include "core/frame/LocalFrame.h"
#include "core/frame/csp/ContentSecurityPolicy.h"
#include "core/html/parser/TextResourceDecoder.h"
+#include "core/inspector/ConsoleMessage.h"
#include "core/loader/ThreadableLoader.h"
#include "platform/network/ResourceError.h"
#include "platform/network/ResourceRequest.h"
@@ -240,7 +241,7 @@ void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& resp
message.append(charset);
message.appendLiteral("\") that is not UTF-8. Aborting the connection.");
// FIXME: We are missing the source line.
- executionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message.toString());
+ executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
}
} else {
// To keep the signal-to-noise ratio low, we only log 200-response with an invalid MIME type.
@@ -250,7 +251,7 @@ void EventSource::didReceiveResponse(unsigned long, const ResourceResponse& resp
message.append(response.mimeType());
message.appendLiteral("\") that is not \"text/event-stream\". Aborting the connection.");
// FIXME: We are missing the source line.
- executionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message.toString());
+ executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message.toString()));
}
}
@@ -302,7 +303,7 @@ void EventSource::didFail(const ResourceError& error)
void EventSource::didFailAccessControlCheck(const ResourceError& error)
{
String message = "EventSource cannot load " + error.failingURL() + ". " + error.localizedDescription();
- executionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);
+ executionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
abortConnectionAttempt();
}

Powered by Google App Engine
This is Rietveld 408576698