| Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| index 45a274056be1cfd24fb2b7ad848dd124e8c9e181..1a8d6524d0872f075a088f43d2f38b14da2bfc9e 100644
|
| --- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| @@ -1049,13 +1049,11 @@ void ContentSecurityPolicy::reportMissingReportURI(const String& policy)
|
| logToConsole("The Content Security Policy '" + policy + "' was delivered in report-only mode, but does not specify a 'report-uri'; the policy will have no effect. Please either add a 'report-uri' directive, or deliver the policy via the 'Content-Security-Policy' header.");
|
| }
|
|
|
| -void ContentSecurityPolicy::logToConsole(const String& message, MessageLevel level)
|
| -{
|
| - logToConsole(ConsoleMessage::create(SecurityMessageSource, level, message));
|
| -}
|
| -
|
| -void ContentSecurityPolicy::logToConsole(ConsoleMessage* consoleMessage, LocalFrame* frame)
|
| +void ContentSecurityPolicy::logToConsole(const String& message, MessageLevel level, PassOwnPtr<SourceLocation> location, LocalFrame* frame)
|
| {
|
| + if (!location)
|
| + location = SourceLocation::capture(m_executionContext);
|
| + ConsoleMessage* consoleMessage = ConsoleMessage::create(SecurityMessageSource, level, message, std::move(location));
|
| if (frame)
|
| frame->document()->addConsoleMessage(consoleMessage);
|
| else if (m_executionContext)
|
|
|