Bug 1432949 - Allow system principal initialize a channel for revoked blob URLs r=geckoview-reviewers,snorp,baku,ckerschb

Differential Revision: https://phabricator.services.mozilla.com/D75659
This commit is contained in:
owlishDeveloper 2020-05-20 14:39:28 +00:00
parent f4bf60b4d4
commit 887def6ff1

View File

@ -803,7 +803,15 @@ BlobURLProtocolHandler::NewChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo,
}
if (blobURL->Revoked()) {
#ifdef MOZ_WIDGET_ANDROID
// if the channel was not triggered by the system principal,
// then we return here because the URL had been revoked
if (aLoadInfo && !aLoadInfo->TriggeringPrincipal()->IsSystemPrincipal()) {
return NS_OK;
}
#else
return NS_OK;
#endif
}
// We want to be sure that we stop the creation of the channel if the blob URL