Issue #2736 - Follow-up: Remove erroneous workerthread CSP check.

In `OnStreamCompleteInternal` an incorrect workerthread CSP enabled check
was added. This was a duplicate check and this is actually on the main
thread so asserts the wrong thread for a `WorkerPref`.
This commit is contained in:
Moonchild 2025-05-22 13:18:43 +02:00 committed by roytam1
commit 6da047af1e

View file

@ -1246,9 +1246,8 @@ private:
// We did inherit CSP in bug 1223647. If we do not already have a CSP, we
// should get it from the HTTP headers on the worker script.
if (mWorkerPrivate->CSPEnabled() &&
!mWorkerPrivate->GetCSP() &&
CSPService::sCSPEnabled) {
if (CSPService::sCSPEnabled &&
!mWorkerPrivate->GetCSP()) {
rv = mWorkerPrivate->SetCSPFromHeaderValues(tCspHeaderValue,
tCspROHeaderValue);
NS_ENSURE_SUCCESS(rv, rv);