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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp

Issue 2112593003: [DevTools] Remove [V8] from InspectorInstrumentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup, moving csp event to dom debugger Created 4 years, 6 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: 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())

Powered by Google App Engine
This is Rietveld 408576698