зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626960 - Remove nsIPrincipal GetURI call in nsOfflineCacheUpdateService.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D69387
This commit is contained in:
Родитель
3c19d7435a
Коммит
5cc49156fd
|
@ -523,7 +523,9 @@ static nsresult OfflineAppPermForPrincipal(nsIPrincipal* aPrincipal,
|
|||
if (!aPrincipal) return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
aPrincipal->GetURI(getter_AddRefs(uri));
|
||||
// Casting to BasePrincipal, as we can't get InnerMost URI otherwise
|
||||
auto* basePrincipal = BasePrincipal::Cast(aPrincipal);
|
||||
basePrincipal->GetURI(getter_AddRefs(uri));
|
||||
|
||||
if (!uri) return NS_OK;
|
||||
|
||||
|
@ -600,7 +602,9 @@ nsOfflineCacheUpdateService::AllowOfflineApp(nsIPrincipal* aPrincipal) {
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
aPrincipal->GetURI(getter_AddRefs(uri));
|
||||
// Casting to BasePrincipal, as we can't get InnerMost URI otherwise
|
||||
auto* basePrincipal = BasePrincipal::Cast(aPrincipal);
|
||||
basePrincipal->GetURI(getter_AddRefs(uri));
|
||||
|
||||
if (!uri) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче