зеркало из https://github.com/mozilla/pjs.git
Bug 342889 SessionSaver no longer working (r=mconnor)
This commit is contained in:
Родитель
4ad5e0e2cc
Коммит
027f3c220c
|
@ -142,8 +142,12 @@ SessionStartup.prototype = {
|
|||
this._iniString = this._readFile(this._getSessionFile());
|
||||
if (this._iniString) {
|
||||
try {
|
||||
// get uri for file path
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
||||
var uri = ioService.newFileURI(this._sessionFile, null, null);
|
||||
|
||||
// parse the session state into JS objects
|
||||
var s = new Components.utils.Sandbox(this._sessionFile.path);
|
||||
var s = new Components.utils.Sandbox(uri.spec);
|
||||
this._initialState = Components.utils.evalInSandbox(this._iniString, s);
|
||||
|
||||
// set bool detecting crash
|
||||
|
|
|
@ -1874,7 +1874,9 @@ SessionStoreService.prototype = {
|
|||
* safe eval'ing
|
||||
*/
|
||||
_safeEval: function sss_safeEval(aStr) {
|
||||
var s = new Components.utils.Sandbox(this._sessionFile.path);
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
||||
var uri = ioService.newFileURI(this._sessionFile, null, null);
|
||||
var s = new Components.utils.Sandbox(uri.spec);
|
||||
return Components.utils.evalInSandbox(aStr, s);
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче