mirror of
https://git.zavage.net/Zavage-Software/search-with-chatgpt-powered-by-openai-extension.git
synced 2026-08-31 22:20:47 -06:00
doc: record the omitted strict_min_version and rejection guards
The plan pinned strict_min_version to 112.0 for the ES-module background
floor, but the existing data_collection_permissions key requires Firefox
140 desktop / 142 Android, so addons-linter warned and warningsAsErrors
failed the build. Measured: 112.0 -> 2 warnings, 140.0 -> 1, 142.0 ->
clean, omitted -> clean. 142.0 was rejected because it locks out ESR 140.
Omitting excludes nobody and degrades gracefully below 112.
Also syncs the plan's background.js block with the rejection guards added
in 22fc754, and reworks two of those comments for clarity.
This commit is contained in:
@@ -67,8 +67,9 @@ async function openChatGpt(query) {
|
||||
|
||||
await browser.tabs.create({ url, active: settings.openIn !== "background-tab" });
|
||||
} catch {
|
||||
// Silence rejections silently — the user expects either a tab to open or
|
||||
// nothing, not an error log. Every failure path must degrade gracefully.
|
||||
// Nothing useful to say and nowhere useful to say it: the user expects a
|
||||
// tab or nothing at all. Both call sites invoke this without awaiting, so
|
||||
// without this catch a failure would log an unhandled rejection.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +103,7 @@ if (browser.commands) {
|
||||
}
|
||||
|
||||
registerMenu().catch(() => {
|
||||
// Silence rejections from menus.removeAll() — it cannot prevent menu creation
|
||||
// on retry, so degrade gracefully with no unhandled rejection logged.
|
||||
// menus.removeAll() is promise-based and can reject; a failed re-registration
|
||||
// cannot be retried usefully from here. (menus.create() is callback-based and
|
||||
// cannot reject, so it needs no guard.)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user