mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
7178e9149d
We want to remove recently closed tabs from the session store when they get re- stored again, and for that we need something to uniquely identify them. As tab IDs are unique per session only, this means that the tab IDs of recently closed tabs resurrected from the previous session could conflict with tabs that have been freshly opened in the current session. E.g. tab 2 has been closed in a previous session and is now part of the session store's closed tab list. In the current session, a number of tabs are opened again and then what is now the *current* tab 2 is closed as well. The result would be that the session store now has two closed tabs with a tab ID of 2. To avoid that scenario, all recently closed tabs are renumbered with an ID in the negative range at the start of the session. Therefore all tabs originally opened in the current session will have a tab ID >= 0, while all recently closed tabs coming directly from a previous session will have a negative tab ID, < -1. (-1 itself remains the sentinel value for an invalid tab ID). Differential Revision: https://phabricator.services.mozilla.com/D15331 --HG-- extra : source : 971ebdae024e188a913d2eda452a7761b4b38d1b extra : histedit_source : b04ac438d2d7325d35e300946fcdb2a385b1598c |
||
---|---|---|
.. | ||
android | ||
locales |