зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 397605. r+sr+a=jst
This commit is contained in:
Родитель
83ad6c43d6
Коммит
e2c308b507
|
@ -852,13 +852,13 @@ nsScriptLoader::PrepareLoadedRequest(nsScriptLoadRequest* aRequest,
|
||||||
// the script has a non-cert principal, the document's principal should be
|
// the script has a non-cert principal, the document's principal should be
|
||||||
// downgraded.
|
// downgraded.
|
||||||
if (channel) {
|
if (channel) {
|
||||||
nsCOMPtr<nsISupports> owner;
|
nsCOMPtr<nsIPrincipal> channelPrincipal;
|
||||||
channel->GetOwner(getter_AddRefs(owner));
|
nsContentUtils::GetSecurityManager()->
|
||||||
nsCOMPtr<nsIPrincipal> principal = do_QueryInterface(owner);
|
GetChannelPrincipal(channel, getter_AddRefs(channelPrincipal));
|
||||||
|
if (channelPrincipal) {
|
||||||
if (principal) {
|
|
||||||
nsCOMPtr<nsIPrincipal> newPrincipal =
|
nsCOMPtr<nsIPrincipal> newPrincipal =
|
||||||
MaybeDowngradeToCodebase(mDocument->NodePrincipal(), principal);
|
MaybeDowngradeToCodebase(mDocument->NodePrincipal(),
|
||||||
|
channelPrincipal);
|
||||||
|
|
||||||
mDocument->SetPrincipal(newPrincipal);
|
mDocument->SetPrincipal(newPrincipal);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче