mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 342889 SessionSaver no longer working (r=mconnor)
This commit is contained in:
parent
850a361e51
commit
9f0142082b
@ -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);
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user