With https://chromium-review.googlesource.com/c/chromium/src/+/1265821, we store extensions pref bit to remember if SW background registered correctly or not and we use that knowledge to not re-register worker upon next extension activation if it already did.
There are ways this pref bit and the actual SW registration to go out of sync and we'll have a broken extension in that case:
1) Clearing storage or clearing worker from SW internals can cause the pref to stay around
2) Extension pref corruption can occur
3) Is counting on //content layer to always keep the registration around guaranteed to work?
Matt, question #3 is for you, https://bugs.chromium.org/p/chromium/issues/detail?id=889687 for more context.
Comment 1 by lazyboy@chromium.org
, Nov 1