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()); MOZ_ASSERT(IsInnerWindow());
if (!mCacheStorage) { if (!mCacheStorage) {
bool forceTrustedOrigin = false; bool forceTrustedOrigin =
if (IsOuterWindow()) { GetOuterWindowInternal()->GetServiceWorkersTestingEnabled();
forceTrustedOrigin = GetServiceWorkersTestingEnabled();
} else {
nsRefPtr<nsGlobalWindow> outer = GetOuterWindowInternal();
forceTrustedOrigin = outer->GetServiceWorkersTestingEnabled();
}
mCacheStorage = CacheStorage::CreateOnMainThread(cache::DEFAULT_NAMESPACE, mCacheStorage = CacheStorage::CreateOnMainThread(cache::DEFAULT_NAMESPACE,
this, GetPrincipal(), this, GetPrincipal(),
IsPrivateBrowsing(), IsPrivateBrowsing(),