You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Just for top-level `await`. Don't do this for the whole file cause `runtime.onInstalled.addListener` needs to be
// called synchronously (https://developer.chrome.com/docs/extensions/mv2/background_pages/#listeners).
(async()=>{
awaitpostInstallDonePromise;
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.
The text was updated successfully, but these errors were encountered:
jumpcutter/src/entry-points/background/main.ts
Lines 46 to 81 in 81b4e50
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 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.
The text was updated successfully, but these errors were encountered: