Bug 1439212 Make ServiceWorkerRegistrationWorkerThread::ShowNotification() check for nullptr mWorkerPrivate. r=asuth

This commit is contained in:
Ben Kelly 2018-02-19 12:07:48 -08:00
parent eb78122ad1
commit 5ff28b6a7f

View File

@ -990,6 +990,10 @@ ServiceWorkerRegistrationWorkerThread::ShowNotification(JSContext* aCx,
const NotificationOptions& aOptions,
ErrorResult& aRv)
{
if (!mWorkerPrivate) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return nullptr;
}
// Until Bug 1131324 exposes ServiceWorkerContainer on workers,
// ShowPersistentNotification() checks for valid active worker while it is