| Index: third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
|
| index cf34b0f0648f6a01271249bf1ab1e70716dfa7b6..c8114a523fb2e257bb4fa9fe1f2f83ef97528c70 100644
|
| --- a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
|
| +++ b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
|
| @@ -26,6 +26,7 @@
|
| #include "core/html/parser/XSSAuditorDelegate.h"
|
|
|
| #include "core/dom/Document.h"
|
| +#include "core/dom/DocumentParser.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/inspector/ConsoleMessage.h"
|
| #include "core/loader/DocumentLoader.h"
|
| @@ -107,6 +108,8 @@ PassRefPtr<EncodedFormData> XSSAuditorDelegate::generateViolationReport(
|
| void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo) {
|
| ASSERT(isMainThread());
|
|
|
| + printf("%s\n", xssInfo.buildConsoleError().utf8().data());
|
| +
|
| UseCounter::count(m_document, xssInfo.m_didBlockEntirePage
|
| ? UseCounter::XSSAuditorBlockedEntirePage
|
| : UseCounter::XSSAuditorBlockedScript);
|
| @@ -124,14 +127,16 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo) {
|
| frameLoader.client()->didDetectXSS(m_document->url(),
|
| xssInfo.m_didBlockEntirePage);
|
|
|
| - if (!m_reportURL.isEmpty())
|
| + if (!m_reportURL.isEmpty()) {
|
| PingLoader::sendViolationReport(m_document->frame(), m_reportURL,
|
| generateViolationReport(xssInfo),
|
| PingLoader::XSSAuditorViolationReport);
|
| + }
|
| +
|
| }
|
|
|
| if (xssInfo.m_didBlockEntirePage)
|
| - m_document->frame()->navigationScheduler().schedulePageBlock(m_document);
|
| + m_document->frame()->navigationScheduler().schedulePageBlock(m_document, -28 /* net::ERR_BLOCKED_BY_AUDITOR */);
|
| }
|
|
|
| } // namespace blink
|
|
|