mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 930202 - Cancel pending session collections when restoring (r=ttaubert)
This commit is contained in:
parent
7c9e1f5552
commit
5dacd0822d
@ -2561,6 +2561,10 @@ let SessionStoreInternal = {
|
||||
Object.keys(tabData.attributes).forEach(a => TabAttributes.persist(a));
|
||||
}
|
||||
|
||||
// Any data that's in the process of being collected for this tab will be
|
||||
// out of date now that we're restoring it.
|
||||
TabState.dropPendingCollections(tab);
|
||||
|
||||
browser.__SS_tabStillLoading = true;
|
||||
|
||||
// keep the data around to prevent dataloss in case
|
||||
@ -4374,11 +4378,23 @@ let TabState = {
|
||||
// can't expect to retrieve different data than the sync call. That's why
|
||||
// we just fill the cache with the data collected from the sync call and
|
||||
// discard any data collected asynchronously.
|
||||
this._pendingCollections.delete(tab);
|
||||
this.dropPendingCollections(tab);
|
||||
|
||||
return tabData;
|
||||
},
|
||||
|
||||
/**
|
||||
* Drop any pending calls to TabState.collect. These calls will
|
||||
* continue to run, but they won't store their results in the
|
||||
* TabStateCache.
|
||||
*
|
||||
* @param tab
|
||||
* tabbrowser tab
|
||||
*/
|
||||
dropPendingCollections: function (tab) {
|
||||
this._pendingCollections.delete(tab);
|
||||
},
|
||||
|
||||
/**
|
||||
* Collect data related to a single tab, including private data.
|
||||
* Use with caution.
|
||||
|
Loading…
Reference in New Issue
Block a user