| Index: Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| diff --git a/Source/core/frame/csp/ContentSecurityPolicy.cpp b/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| index 3a17d992d178f27499432c74fded97f6e7afdeac..fc2ec907293787fe8114f537132db2a4e4ef5b38 100644
|
| --- a/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| +++ b/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/events/SecurityPolicyViolationEvent.h"
|
| #include "core/frame/LocalDOMWindow.h"
|
| #include "core/frame/LocalFrame.h"
|
| +#include "core/frame/Settings.h"
|
| #include "core/frame/UseCounter.h"
|
| #include "core/frame/csp/CSPDirectiveList.h"
|
| #include "core/frame/csp/CSPSource.h"
|
| @@ -658,7 +659,7 @@ void ContentSecurityPolicy::reportViolation(const String& directiveText, const S
|
| if (experimentalFeaturesEnabled())
|
| frame->domWindow()->enqueueDocumentEvent(SecurityPolicyViolationEvent::create(EventTypeNames::securitypolicyviolation, violationData));
|
|
|
| - if (reportEndpoints.isEmpty())
|
| + if (!document->settings()->CSPViolationReportsEnabled() || reportEndpoints.isEmpty())
|
| return;
|
|
|
| // We need to be careful here when deciding what information to send to the
|
|
|