If there was an update of the extension (i.e. browser.runtime.onInstalled.addListener listener gets called), then, if it doesn't finish and then the browser is closed, initBrowserHotkeysListenerinitIconAndBadgeUpdater will not be called until the next update.
This seems to me like the browser.runtime.onInstalled API is poorly designed, requiring us to make this postInstallDonePromise.
Or could we just remove the onInstalled listener and just execute migrations every time __lastHandledUpdateToVersion is not equal to the version from the manifest?
This is not normal for the listener to fail thought, so it's not very important.
https://github.com/WofWca/jumpcutter/blob/81b4e507b68d9f7c50e90161326edc65038ae28c/src/entry-points/background/main.ts#L46-L81
If there was an update of the extension (i.e.
browser.runtime.onInstalled.addListener
listener gets called), then, if it doesn't finish and then the browser is closed,initBrowserHotkeysListener
initIconAndBadgeUpdater
will not be called until the next update.This seems to me like the
browser.runtime.onInstalled
API is poorly designed, requiring us to make thispostInstallDonePromise
. Or could we just remove theonInstalled
listener and just execute migrations every time__lastHandledUpdateToVersion
is not equal to the version from the manifest?This is not normal for the listener to fail thought, so it's not very important.