Bug 540534 - Use Cu instead of Components.utils in nsSessionStartup [r=dietrich]

This commit is contained in:
Paul O’Shannessy 2010-01-22 12:21:41 -08:00
parent 5c7218952b
commit 070098c9d1

View File

@ -69,7 +69,8 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
const STATE_RUNNING_STR = "running";
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100 megabytes
@ -132,8 +133,8 @@ SessionStartup.prototype = {
try {
// parse the session state into JS objects
var s = new Components.utils.Sandbox("about:blank");
var initialState = Components.utils.evalInSandbox("(" + this._iniString + ")", s);
var s = new Cu.Sandbox("about:blank");
var initialState = Cu.evalInSandbox("(" + this._iniString + ")", s);
}
catch (ex) { debug("The session file is invalid: " + ex); }
@ -294,7 +295,7 @@ SessionStartup.prototype = {
return content.replace(/\r\n?/g, "\n");
}
catch (ex) { Components.utils.reportError(ex); }
catch (ex) { Cu.reportError(ex); }
return null;
},