diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp index 5dc4038be5..e45301c1d9 100644 --- a/dom/workers/ScriptLoader.cpp +++ b/dom/workers/ScriptLoader.cpp @@ -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);