Bug 342889 SessionSaver no longer working (r=mconnor)

This commit is contained in:
dietrich%mozilla.com 2006-06-28 17:32:12 +00:00
parent 850a361e51
commit 9f0142082b
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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);
},