Theseus 0.3.114: add-on update poller fires after chrome, not during tab restore
Moved the 30-second boot poll from whenReady+30s into onChromeReady so restoreTabs' network fetches aren't competing with the add-on manifest fetches for the first few seconds. The 4 h interval stays where it was. Preload audit (no change needed): theseus-id-preload.js already short- circuits in subframes (window.top === window guard), addon-inject- preload.js keeps page scripts top-frame only by design, and no-badge-preload.js intentionally covers service workers.
This commit is contained in:
parent
bd55e75536
commit
8bb5b3d26a
2 changed files with 6 additions and 2 deletions
6
main.js
6
main.js
|
|
@ -1940,6 +1940,10 @@ function onChromeReady() {
|
||||||
// Re-emit any pending update notice — harmless if nothing is pending.
|
// Re-emit any pending update notice — harmless if nothing is pending.
|
||||||
emitUpdateAvailable();
|
emitUpdateAvailable();
|
||||||
scheduleStartupUpdateCheck();
|
scheduleStartupUpdateCheck();
|
||||||
|
// Add-on update poller, 30 s after the first page is up. Moved here from
|
||||||
|
// whenReady+30s so it never races tab restore (restoreTabs runs above and
|
||||||
|
// its network fetches should go unimpeded for the first few seconds).
|
||||||
|
setTimeout(() => pollAddonUpdates("boot"), 30_000);
|
||||||
refreshRemoteHomeCards().catch(() => {});
|
refreshRemoteHomeCards().catch(() => {});
|
||||||
}
|
}
|
||||||
function applyThrottle() {
|
function applyThrottle() {
|
||||||
|
|
@ -12180,7 +12184,7 @@ if (!process.env.THESEUS_NO_AUTOSTART && !app.requestSingleInstanceLock()) {
|
||||||
// check and never showed up), so re-check every 4 h while running, and
|
// check and never showed up), so re-check every 4 h while running, and
|
||||||
// tell the chrome whenever something is staged so the user sees a
|
// tell the chrome whenever something is staged so the user sees a
|
||||||
// "restart to apply" chip instead of finding out in Settings.
|
// "restart to apply" chip instead of finding out in Settings.
|
||||||
setTimeout(() => pollAddonUpdates("boot"), 30_000);
|
// boot-time poll now runs from onChromeReady; interval poll (4 h) is fine here.
|
||||||
setInterval(() => pollAddonUpdates("interval"), 4 * 60 * 60 * 1000);
|
setInterval(() => pollAddonUpdates("interval"), 4 * 60 * 60 * 1000);
|
||||||
// Launched from an installed app's shortcut: just that app's window; the
|
// Launched from an installed app's shortcut: just that app's window; the
|
||||||
// browser window comes up on the next plain launch (second-instance).
|
// browser window comes up on the next plain launch (second-instance).
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "theseus-navigator",
|
"name": "theseus-navigator",
|
||||||
"version": "0.3.113",
|
"version": "0.3.114",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"description": "Theseus Navigator — a browser that follows the thread. By Silent Mode, a Deviant project.",
|
"description": "Theseus Navigator — a browser that follows the thread. By Silent Mode, a Deviant project.",
|
||||||
"author": "Silent Mode",
|
"author": "Silent Mode",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue