| Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| index 123b53e93dd58fb59dac7e479c8f5afbbc059afe..81ec559b652957a22d358c0ddeb0f343c1bfb9d1 100644
|
| --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
| @@ -2086,6 +2086,15 @@ bool WebLocalFrameImpl::maybeRenderFallbackContent(
|
| // is infringed.
|
| void WebLocalFrameImpl::reportContentSecurityPolicyViolation(
|
| const blink::WebContentSecurityPolicyViolation& violation) {
|
| + addMessageToConsole(blink::WebConsoleMessage(
|
| + WebConsoleMessage::LevelError, violation.consoleMessage,
|
| + violation.sourceLocation.url, violation.sourceLocation.lineNumber,
|
| + violation.sourceLocation.columnNumber));
|
| +
|
| + std::unique_ptr<SourceLocation> sourceLocation = SourceLocation::create(
|
| + violation.sourceLocation.url, violation.sourceLocation.lineNumber,
|
| + violation.sourceLocation.columnNumber, nullptr);
|
| +
|
| DCHECK(frame() && frame()->document());
|
| Document* document = frame()->document();
|
| Vector<String> reportEndpoints;
|
| @@ -2101,12 +2110,9 @@ void WebLocalFrameImpl::reportContentSecurityPolicyViolation(
|
| violation.header, /* header */
|
| static_cast<ContentSecurityPolicyHeaderType>(violation.disposition),
|
| ContentSecurityPolicy::ViolationType::URLViolation, /* ViolationType */
|
| - nullptr, /* LocalFrame */
|
| + std::move(sourceLocation), nullptr, /* LocalFrame */
|
| violation.afterRedirect ? RedirectStatus::FollowedRedirect
|
| : RedirectStatus::NoRedirect,
|
| - // TODO(arthursonzogni, clamy) Provide the context line number here.
|
| - // See http://crbug.com/690946
|
| - 0, /* contextLine */
|
| nullptr); /* Element */
|
| }
|
|
|
|
|