Bug 1290944 - Part 3.2: Pass LOAD_BYPASS_CACHE caused by script expiration timer to ServiceWorkerInfo. r=bkelly

This commit is contained in:
Ho-Pang Hsu
2017-01-04 17:08:58 +08:00
parent bdcbdfa0ee
commit e6a5e45d91
7 changed files with 66 additions and 15 deletions

View File

@@ -312,6 +312,12 @@ public:
return copy.forget();
}
void
SaveLoadFlags(nsLoadFlags aLoadFlags)
{
mCallback->SaveLoadFlags(aLoadFlags);
}
void
NetworkFinished(nsresult aStatus)
{
@@ -631,6 +637,9 @@ CompareNetwork::Initialize(nsIPrincipal* aPrincipal, const nsAString& aURL, nsIL
flags |= nsIRequest::LOAD_BYPASS_CACHE;
}
// Save the load flags for propagating to ServiceWorkerInfo.
mManager->SaveLoadFlags(flags);
// Note that because there is no "serviceworker" RequestContext type, we can
// use the TYPE_INTERNAL_SCRIPT content policy types when loading a service
// worker.