mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1083422 - Add triggering Principal to nsILoadInfo - update consumers (r=bz)
This commit is contained in:
parent
59e7c4cbd1
commit
ba415e054d
@ -332,7 +332,7 @@ nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel,
|
||||
}
|
||||
|
||||
if (loadInfo->GetForceInheritPrincipal()) {
|
||||
NS_ADDREF(*aPrincipal = loadInfo->LoadingPrincipal());
|
||||
NS_ADDREF(*aPrincipal = loadInfo->TriggeringPrincipal());
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -11590,7 +11590,7 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
|
||||
owner = nsNullPrincipal::CreateWithInheritedAttributes(loadInfo->LoadingPrincipal());
|
||||
NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE);
|
||||
} else if (loadInfo->GetForceInheritPrincipal()) {
|
||||
owner = loadInfo->LoadingPrincipal();
|
||||
owner = loadInfo->TriggeringPrincipal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
|
||||
nsCOMPtr<nsILoadInfo> loadInfo;
|
||||
aChannel->GetLoadInfo(getter_AddRefs(loadInfo));
|
||||
if (loadInfo && loadInfo->GetForceInheritPrincipal()) {
|
||||
principal = loadInfo->LoadingPrincipal();
|
||||
principal = loadInfo->TriggeringPrincipal();
|
||||
} else {
|
||||
// No execution without a principal!
|
||||
NS_ASSERTION(!owner, "Non-principal owner?");
|
||||
|
Loading…
Reference in New Issue
Block a user