Bug 1353638 - P1: Hide useCache registrationOptions. r=bkelly

This commit is contained in:
Ho-Pang Hsu 2017-04-05 23:42:50 +08:00
parent e71676d7ea
commit 28ae7dfbde
2 changed files with 3 additions and 4 deletions

View File

@ -42,5 +42,4 @@ partial interface ServiceWorkerContainer {
dictionary RegistrationOptions {
USVString scope;
boolean useCache;
};

View File

@ -207,9 +207,9 @@ ServiceWorkerContainer::Register(const nsAString& aScriptURL,
}
}
bool useCache = aOptions.mUseCache.WasPassed() && aOptions.mUseCache.Value();
nsLoadFlags loadFlags = useCache ? nsIRequest::LOAD_NORMAL
: nsIRequest::VALIDATE_ALWAYS;
// This is a quick fix for temporarily turning off script loading setting when
// registering a service worker. This should be removed in Bug 1353636.
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
// The spec says that the "client" passed to Register() must be the global
// where the ServiceWorkerContainer was retrieved from.