Page MenuHomePhabricator

Check against 'workerRegistration.pushManager' before creating push subscription on web
ClosedPublic

Authored by marcin on Dec 15 2023, 2:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 11, 2:32 PM
Unknown Object (File)
Mon, Nov 11, 1:42 PM
Unknown Object (File)
Mon, Nov 11, 12:00 PM
Unknown Object (File)
Sun, Nov 10, 10:07 PM
Unknown Object (File)
Sat, Nov 9, 1:31 AM
Unknown Object (File)
Oct 3 2024, 9:27 AM
Unknown Object (File)
Oct 3 2024, 9:27 AM
Unknown Object (File)
Oct 3 2024, 9:27 AM
Subscribers

Details

Summary

This differential solves https://linear.app/comm/issue/ENG-6006/. Even though web documentation doesn't allow pushManager property of workerRegistration
to be nullish, there are some recources that suggest it could actually be the case so we add additional check to protect against the issue.

Test Plan

Check that web notifications are working properly. We can't reproduce the issue as it is probably some race condition so we can't directly test this change. However
this diff should protect against it since we won't let access pushManager properties in case it is nullish.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable