Open Bug 1399655 Opened 8 years ago Updated 2 months ago

Extension tabs are not closed when an extension is removed

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(firefox57 fix-optional)

Tracking Status
firefox57 --- fix-optional

People

(Reporter: mstriemer, Unassigned)

References

Details

When an extension is uninstalled, we are supposed to close any tabs that are open for that extension. That is not currently the case. Apparently there are tests to check that this happens, but I couldn't find an associated bug.
Priority: -- → P3
This is caused by a page in the extension, loaded into a tab, not using any extension api. If it did, it would be closed when the extension is uninstalled. This is due to lazy loading of ExtensionPageContextParent, which is where tab unload is initiated. ExtensionPageContextParent is only created when needed (ie. an API call is made). Bug 1401055 illustrates further potential problems.
Product: Toolkit → WebExtensions
See Also: → 1742771
See Also: → 1762224
Severity: normal → S3
See Also: → 1955530
Duplicate of this bug: 1954958

Comment 2 explains the reason, which also includes extension tabs that have been discarded (or equivalently, in the tab strip but not loaded by session restore).

Note: before anyone jumps on this to "fix" this, note that this behavior is sometimes explicitly relied on by extensions to avoid the loss of data when extensions updates.

For example, I mentioned this behavior here, and the extension author stated that they will rely on it until a better solution exists:

A concrete example of my personal experience relating to the desire of keeping extension tabs, but then in Chrome: I have a PDF viewer extension in Chrome that uses an extension page to render a PDF. If the extension were to update, all shown PDFs would be lost, which is why I suppress extension updates if any view is active. I imagine there to be more use cases like this that would benefit from having a first class way of keeping tabs (e.g. newtab/homepage extensions). Maybe discarding extension tabs on update, instead of closing them? That would also help with cases like bug 1742771.

You need to log in before you can comment on or make changes to this bug.