Fixes EE-64 - Save sitekeys in 'browser.storage.local' and clean earlier
To prevent filling browser.storage.session
we can save sitekeys in browser.storage.local
.
When the tab is closed we remove the sitekeys for it (handle onRemoved
and onReplaced
) so we don't leave anything.
We don't have to do any migration as b.s.s
is cleared on session exit.
Also now we clean the sitekeys earlier - when user navigates in existing tab (as existing frames sitekeys are not needed anymore). Previously they were cleared when the tab is closed (so it could potentially grow for a long time).
The test (confirming we clean early) is added.
Also the test that asserts that sitekeys are saved even if b.s.s
storage is full (confirming it helps to keep b.s.s
not touched by sitekeys and fix/minimize the original issue) is added.
Edited by Anton Smirnov