Treat "incognito":"split" as a warning instead of a hard error
Categories
(WebExtensions :: General, enhancement, P3)
Tracking
(firefox127 fixed)
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [addons-jira])
Attachments
(1 file)
When an extension has "incognito":"split"
in manifest.json, Firefox refuses to load it, because it is not part of the enum at: https://searchfox.org/mozilla-central/rev/4cef3cd672243f7ae6d46103ca0ea7b253a74484/toolkit/components/extensions/schemas/manifest.json#122-127
In Chrome, "incognito":"split"
is required if an extension wants to open extension tabs in incognito mode. In Firefox "incognito":"split"
is not supported (bug 1380812), and tabs can be opened in private browsing mode (provided that the extension has access to it).
To avoid porting difficulties, we should accept "incognito":"split"
value, and log a non-fatal warning instead of preventing the extension from loading.
To resolve this bug, it suffices to turn the enum type in a list of enum where the "split"
value is annotated with "deprecated"
, similar to what was done in https://hg.mozilla.org/mozilla-central/rev/e676737b9689#l2.2 as part of bug 1370077. When we recognize "split" but do not support it, we just treat it as "incognito":"spanning"
.
Updated•8 months ago
|
Assignee | ||
Comment 1•8 months ago
|
||
Updated•8 months ago
|
Assignee | ||
Comment 2•8 months ago
|
||
(In reply to Rob Wu [:robwu] from comment #0)
To resolve this bug, it suffices to turn the enum type in a list of enum where the
"split"
value is annotated with"deprecated"
, similar to what was done in https://hg.mozilla.org/mozilla-central/rev/e676737b9689#l2.2 as part of bug 1370077. When we recognize "split" but do not support it, we just treat it as"incognito":"spanning"
.
I ultimately ended up using a different implementation, using "onError":"warn"
. The advantage of this to "deprecated" is that the fallback value ("spanning") is automatically selected instead of using the invalid value. This might also be a good strategy to use to resolve bug 1831417.
Assignee | ||
Comment 3•7 months ago
|
||
After discussing with the team, there were concerns with silently treating "incognito":"split"
as "incognito":"spanning"
. So the safest option to minimize risk while still supporting extensions, is to accept "incognito":"split"
extensions, in non-private browsing mode only. So effectively "incognito": "not_allowed"
, optionally with a flag/pref to opt in to running the extension in private browsing mode.
Comment 5•5 months ago
|
||
bugherder |
Updated•5 months ago
|
Assignee | ||
Comment 6•5 months ago
|
||
Why was this classified as a task? It is an enhancement: previously extensions with incognito:split could not load at all in Firefox, now they can.
Despite this improvement, extension developers are encouraged to drop incognito:split from their manifest because otherwise the extension cannot be used in Firefox's private browsing mode.
Comment 7•5 months ago
|
||
If dev-doc is needed for the release, as you just added to the bug, that indeed fits our enhancement definition.
MDN content changes are ready for review:
- BCD "incognito": "split" support #23124
- Docs Document support for "incognito": "split" #33661
Description
•