Bug 956930 - Launching an app preloading appcache throws an offline error, r=jduell+sicking
This commit is contained in:
@@ -6781,9 +6781,15 @@ nsDocShell::OnRedirectStateChange(nsIChannel* aOldChannel,
|
||||
// Permission will be checked in the parent process.
|
||||
appCacheChannel->SetChooseApplicationCache(true);
|
||||
} else {
|
||||
appCacheChannel->SetChooseApplicationCache(
|
||||
NS_ShouldCheckAppCache(newURI,
|
||||
mInPrivateBrowsing));
|
||||
nsCOMPtr<nsIScriptSecurityManager> secMan =
|
||||
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID);
|
||||
|
||||
if (secMan) {
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
secMan->GetDocShellCodebasePrincipal(newURI, this, getter_AddRefs(principal));
|
||||
appCacheChannel->SetChooseApplicationCache(NS_ShouldCheckAppCache(principal,
|
||||
mInPrivateBrowsing));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9713,8 +9719,15 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
||||
// Permission will be checked in the parent process
|
||||
appCacheChannel->SetChooseApplicationCache(true);
|
||||
} else {
|
||||
appCacheChannel->SetChooseApplicationCache(
|
||||
NS_ShouldCheckAppCache(aURI, mInPrivateBrowsing));
|
||||
nsCOMPtr<nsIScriptSecurityManager> secMan =
|
||||
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID);
|
||||
|
||||
if (secMan) {
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
secMan->GetDocShellCodebasePrincipal(aURI, this, getter_AddRefs(principal));
|
||||
appCacheChannel->SetChooseApplicationCache(
|
||||
NS_ShouldCheckAppCache(principal, mInPrivateBrowsing));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user