Index: third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp |
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp |
index 75f9c12e18405f05e006edd98ce85448f81bb9fe..b2ec537d89602a2aa72a2111549b1688ba943092 100644 |
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp |
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp |
@@ -63,6 +63,7 @@ namespace blink { |
static const char webglErrorFiredEventName[] = "webglErrorFired"; |
static const char webglWarningFiredEventName[] = "webglWarningFired"; |
static const char webglErrorNameProperty[] = "webglErrorName"; |
+static const char scriptBlockedByCSPEventName[] = "scriptBlockedByCSP"; |
namespace DOMDebuggerAgentState { |
static const char eventListenerBreakpoints[] = "eventListenerBreakpoints"; |
@@ -631,6 +632,15 @@ void InspectorDOMDebuggerAgent::cancelNativeBreakpoint() |
m_v8Session->cancelPauseOnNextStatement(); |
} |
+void InspectorDOMDebuggerAgent::scriptExecutionBlockedByCSP(const String& directiveText) |
+{ |
+ if (!preparePauseOnNativeEventData(scriptBlockedByCSPEventName, 0)) |
+ return; |
+ std::unique_ptr<protocol::DictionaryValue> directive = protocol::DictionaryValue::create(); |
+ directive->setString("directiveText", directiveText); |
+ m_v8Session->breakProgramOnException(protocol::Debugger::Paused::ReasonEnum::CSPViolation, std::move(directive)); |
kozy
2016/07/06 19:38:22
Let's move it to "DOMDebugger way" instead of brea
dgozman
2016/07/06 22:52:33
Done.
|
+} |
+ |
void InspectorDOMDebuggerAgent::setXHRBreakpoint(ErrorString* errorString, const String& url) |
{ |
if (url.isEmpty()) |