Bug 824021 - Don't clear set of windows to resurrect on write when receiving messages r=yoric

This commit is contained in:
Tim Taubert 2014-04-16 01:01:05 +02:00
Родитель 27e097549c
Коммит 3b10949aa1
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -678,8 +678,6 @@ let SessionStoreInternal = {
debug("received unknown message '" + aMessage.name + "'");
break;
}
this._clearRestoringWindows();
},
/**
@ -3400,6 +3398,15 @@ let SessionStoreInternal = {
this._closedWindows.splice(spliceTo, this._closedWindows.length);
},
/**
* Clears the set of windows that are "resurrected" before writing to disk to
* make closing windows one after the other until shutdown work as expected.
*
* This function should only be called when we are sure that there has been
* a user action that indicates the browser is actively being used and all
* windows that have been closed before are not part of a series of closing
* windows.
*/
_clearRestoringWindows: function ssi_clearRestoringWindows() {
for (let i = 0; i < this._closedWindows.length; i++) {
delete this._closedWindows[i]._shouldRestore;