mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 637673 - SessionStore file errors [r=mbrubeck]
This commit is contained in:
parent
0bcd1ae24f
commit
f030df6d85
@ -199,7 +199,8 @@ SessionStore.prototype = {
|
||||
this._loadState = STATE_QUITTING;
|
||||
|
||||
// No need for this back up, we are shutting down just fine
|
||||
this._sessionFileBackup.remove(false);
|
||||
if (this._sessionFileBackup.exists())
|
||||
this._sessionFileBackup.remove(false);
|
||||
|
||||
observerService.removeObserver(this, "domwindowopened");
|
||||
observerService.removeObserver(this, "domwindowclosed");
|
||||
@ -644,6 +645,8 @@ SessionStore.prototype = {
|
||||
let dirService = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
|
||||
let session = dirService.get("ProfD", Ci.nsILocalFile);
|
||||
session.append("sessionstore.bak");
|
||||
if (!session.exists())
|
||||
return;
|
||||
|
||||
let data = JSON.parse(this._readFile(session));
|
||||
if (!data || data.windows.length == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user