mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 897095 - Don't call restoreHistory() for closed windows; r=smacleod
This commit is contained in:
parent
cc31fa6e4f
commit
76a179666d
@ -2585,7 +2585,6 @@ let SessionStoreInternal = {
|
||||
restoreHistory:
|
||||
function ssi_restoreHistory(aWindow, aTabs, aTabData, aIdMap, aDocIdentMap,
|
||||
aRestoreImmediately) {
|
||||
var _this = this;
|
||||
// if the tab got removed before being completely restored, then skip it
|
||||
while (aTabs.length > 0 && !(this._canRestoreTabHistory(aTabs[0]))) {
|
||||
aTabs.shift();
|
||||
@ -2654,9 +2653,11 @@ let SessionStoreInternal = {
|
||||
tab.dispatchEvent(event);
|
||||
|
||||
// Restore the history in the next tab
|
||||
aWindow.setTimeout(function(){
|
||||
_this.restoreHistory(aWindow, aTabs, aTabData, aIdMap, aDocIdentMap,
|
||||
aRestoreImmediately);
|
||||
aWindow.setTimeout(() => {
|
||||
if (!aWindow.closed) {
|
||||
this.restoreHistory(aWindow, aTabs, aTabData, aIdMap, aDocIdentMap,
|
||||
aRestoreImmediately);
|
||||
}
|
||||
}, 0);
|
||||
|
||||
// This could cause us to ignore MAX_CONCURRENT_TAB_RESTORES a bit, but
|
||||
|
Loading…
Reference in New Issue
Block a user