Bug 1158264 - Send an observer service event when a service worker intercept a request. r=bkelly

This commit is contained in:
Alexandre Poirot 2016-01-14 05:53:00 -08:00
Родитель f6bfce457c
Коммит c7c2eba05c
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -209,6 +209,12 @@ public:
rv = mChannel->FinishSynthesizedResponse(mResponseURLSpec);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Failed to finish synthesized response");
nsCOMPtr<nsIObserverService> obsService = services::GetObserverService();
if (obsService) {
obsService->NotifyObservers(underlyingChannel, "service-worker-synthesized-response", nullptr);
}
return rv;
}