Bug 1202085 - Part 3: Relax the assertion in ServiceWorkerManager::IsControlled to only happen when we think the document is controlled; r=jdm

This commit is contained in:
Ehsan Akhgari 2015-10-27 14:10:39 -04:00
parent 94e1c22d9d
commit 7ec01115bf

View File

@ -3138,7 +3138,6 @@ bool
ServiceWorkerManager::IsControlled(nsIDocument* aDoc, ErrorResult& aRv)
{
MOZ_ASSERT(aDoc);
MOZ_ASSERT(!nsContentUtils::IsInPrivateBrowsing(aDoc));
RefPtr<ServiceWorkerRegistrationInfo> registration;
nsresult rv = GetDocumentRegistration(aDoc, getter_AddRefs(registration));
@ -3148,6 +3147,7 @@ ServiceWorkerManager::IsControlled(nsIDocument* aDoc, ErrorResult& aRv)
return false;
}
MOZ_ASSERT_IF(!!registration, !nsContentUtils::IsInPrivateBrowsing(aDoc));
return !!registration;
}