mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1006671 - Remove unnecessary JSContext argument to nsContentUtils::GetContentSecurityPolicy. r=bholley
This commit is contained in:
parent
23d13553bc
commit
da5b38f868
@ -476,8 +476,7 @@ public:
|
||||
/**
|
||||
* Get the ContentSecurityPolicy for a JS context.
|
||||
**/
|
||||
static bool GetContentSecurityPolicy(JSContext* aCx,
|
||||
nsIContentSecurityPolicy** aCSP);
|
||||
static bool GetContentSecurityPolicy(nsIContentSecurityPolicy** aCSP);
|
||||
|
||||
// Returns the subject principal. Guaranteed to return non-null. May only
|
||||
// be called when nsContentUtils is initialized.
|
||||
|
@ -6359,11 +6359,9 @@ nsContentUtils::FindInternalContentViewer(const char* aType,
|
||||
}
|
||||
|
||||
bool
|
||||
nsContentUtils::GetContentSecurityPolicy(JSContext* aCx,
|
||||
nsIContentSecurityPolicy** aCSP)
|
||||
nsContentUtils::GetContentSecurityPolicy(nsIContentSecurityPolicy** aCSP)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
MOZ_ASSERT(aCx == GetCurrentJSContext());
|
||||
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
nsresult rv = SubjectPrincipal()->GetCsp(getter_AddRefs(csp));
|
||||
|
@ -3925,8 +3925,7 @@ WorkerPrivate::GetLoadInfo(JSContext* aCx, nsPIDOMWindow* aWindow,
|
||||
MOZ_ASSERT(loadInfo.mPrincipal);
|
||||
MOZ_ASSERT(isChrome || !loadInfo.mDomain.IsEmpty());
|
||||
|
||||
if (!nsContentUtils::GetContentSecurityPolicy(aCx,
|
||||
getter_AddRefs(loadInfo.mCSP))) {
|
||||
if (!nsContentUtils::GetContentSecurityPolicy(getter_AddRefs(loadInfo.mCSP))) {
|
||||
NS_WARNING("Failed to get CSP!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -1902,7 +1902,7 @@ nsCrypto::GenerateCRMFRequest(JSContext* aContext,
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
if (!nsContentUtils::GetContentSecurityPolicy(aContext, getter_AddRefs(csp))) {
|
||||
if (!nsContentUtils::GetContentSecurityPolicy(getter_AddRefs(csp))) {
|
||||
NS_ERROR("Error: failed to get CSP");
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user