aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorTim van der Lippe <TimvdLippe@users.noreply.github.com>2025-05-08 12:46:31 +0200
committerGitHub <noreply@github.com>2025-05-08 10:46:31 +0000
commitb6b80d4f6f514c08f36c85f5d8b372048078b94d (patch)
treec95de877945d26029dbbccedaed38681bdd4e866 /components/script/script_thread.rs
parentf3f4cc5500a83f520a3a1e5905344b778109031c (diff)
downloadservo-b6b80d4f6f514c08f36c85f5d8b372048078b94d.tar.gz
servo-b6b80d4f6f514c08f36c85f5d8b372048078b94d.zip
Correct event_target for CSP violations (#36887)
All logic is implemented in `report_csp_violations` to avoid pulling in various element-logic into SecurityManager. Update the `icon-blocked.sub.html` WPT test to ensure that the document is the correct target (verified in Firefox and Chrome). Fixes #36806 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 54cf89a213f..d6ab18be49b 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -3606,7 +3606,8 @@ impl ScriptThread {
fn handle_csp_violations(&self, id: PipelineId, _: RequestId, violations: Vec<csp::Violation>) {
if let Some(global) = self.documents.borrow().find_global(id) {
- global.report_csp_violations(violations);
+ // TODO(https://github.com/w3c/webappsec-csp/issues/687): Update after spec is resolved
+ global.report_csp_violations(violations, None);
}
}