зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1545909 - Part 1 of 2: Recheck whether to use appcache on the parent process on the redirected top-level loading channel, r=michal
Differential Revision: https://phabricator.services.mozilla.com/D61842 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b903fe63d9
Коммит
3dd48dc331
|
@ -914,7 +914,22 @@ mozilla::ipc::IPCResult HttpChannelParent::RecvRedirect2Verify(
|
|||
nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
|
||||
do_QueryInterface(newHttpChannel);
|
||||
if (appCacheChannel) {
|
||||
appCacheChannel->SetChooseApplicationCache(aChooseAppcache);
|
||||
bool setChooseAppCache = false;
|
||||
if (aChooseAppcache) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
// Using GetURI because this is what DoAsyncOpen uses.
|
||||
newHttpChannel->GetURI(getter_AddRefs(uri));
|
||||
|
||||
OriginAttributes attrs;
|
||||
NS_GetOriginAttributes(newHttpChannel, attrs);
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal =
|
||||
BasePrincipal::CreateContentPrincipal(uri, attrs);
|
||||
|
||||
setChooseAppCache = NS_ShouldCheckAppCache(principal);
|
||||
}
|
||||
|
||||
appCacheChannel->SetChooseApplicationCache(setChooseAppCache);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsILoadInfo> newLoadInfo = newHttpChannel->LoadInfo();
|
||||
|
|
Загрузка…
Ссылка в новой задаче