Bug 1184789 - Remove unnecessary IsOuterWindow() check from nsGlobalWindow::GetCaches(). r=khuey

This commit is contained in:
Michael Layzell 2015-07-16 17:19:00 -04:00
parent 712e46eade
commit d48d4e6f85

View File

@ -11110,13 +11110,9 @@ nsGlobalWindow::GetCaches(ErrorResult& aRv)
MOZ_ASSERT(IsInnerWindow());
if (!mCacheStorage) {
bool forceTrustedOrigin = false;
if (IsOuterWindow()) {
forceTrustedOrigin = GetServiceWorkersTestingEnabled();
} else {
nsRefPtr<nsGlobalWindow> outer = GetOuterWindowInternal();
forceTrustedOrigin = outer->GetServiceWorkersTestingEnabled();
}
bool forceTrustedOrigin =
GetOuterWindowInternal()->GetServiceWorkersTestingEnabled();
mCacheStorage = CacheStorage::CreateOnMainThread(cache::DEFAULT_NAMESPACE,
this, GetPrincipal(),
IsPrivateBrowsing(),