Bug 1523454 - Expose isParentInterceptEnabled in nsIServiceWorkerManager;r=asuth

Feel free to cancel the review if you already have a patch or if you wanted another approach.
Mostly wrote this patch to make sure the DevTools patch on top of it would work.

Differential Revision: https://phabricator.services.mozilla.com/D19159

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2019-02-08 20:05:34 +00:00
Родитель f56506f966
Коммит 0fc02b55a8
2 изменённых файлов: 9 добавлений и 0 удалений

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

@ -180,6 +180,8 @@ interface nsIServiceWorkerManager : nsISupports
void addListener(in nsIServiceWorkerManagerListener aListener);
void removeListener(in nsIServiceWorkerManagerListener aListener);
bool isParentInterceptEnabled();
};
%{ C++

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

@ -3010,5 +3010,12 @@ void ServiceWorkerManager::MaybeSendUnregister(nsIPrincipal* aPrincipal,
NS_ConvertUTF8toUTF16(aScope));
}
NS_IMETHODIMP
ServiceWorkerManager::IsParentInterceptEnabled(bool* aIsEnabled) {
MOZ_ASSERT(NS_IsMainThread());
*aIsEnabled = ServiceWorkerParentInterceptEnabled();
return NS_OK;
}
} // namespace dom
} // namespace mozilla