Bug 1157248 - TabChild should initialize ServiceWorkerManager before starting the first loading, r=nsm

This commit is contained in:
Andrea Marchesini 2015-04-24 00:44:24 +02:00
parent b8b6ac7d84
commit 99b4705cce

View File

@ -1705,6 +1705,10 @@ TabChild::RecvLoadURL(const nsCString& aURI,
SetProcessNameToAppName();
nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
MOZ_ASSERT(swm);
swm->LoadRegistrations(aConfiguration.serviceWorkerRegistrations());
nsresult rv = WebNavigation()->LoadURI(NS_ConvertUTF8toUTF16(aURI).get(),
nsIWebNavigation::LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_OWNER,
@ -1717,10 +1721,6 @@ TabChild::RecvLoadURL(const nsCString& aURI,
CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("URL"), aURI);
#endif
nsRefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
MOZ_ASSERT(swm);
swm->LoadRegistrations(aConfiguration.serviceWorkerRegistrations());
return true;
}