mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 540534 - Use Cu instead of Components.utils in nsSessionStartup [r=dietrich]
This commit is contained in:
parent
5c7218952b
commit
070098c9d1
@ -69,7 +69,8 @@
|
|||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
const Cr = Components.results;
|
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 STATE_RUNNING_STR = "running";
|
||||||
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100 megabytes
|
const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100 megabytes
|
||||||
@ -132,8 +133,8 @@ SessionStartup.prototype = {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// parse the session state into JS objects
|
// parse the session state into JS objects
|
||||||
var s = new Components.utils.Sandbox("about:blank");
|
var s = new Cu.Sandbox("about:blank");
|
||||||
var initialState = Components.utils.evalInSandbox("(" + this._iniString + ")", s);
|
var initialState = Cu.evalInSandbox("(" + this._iniString + ")", s);
|
||||||
}
|
}
|
||||||
catch (ex) { debug("The session file is invalid: " + ex); }
|
catch (ex) { debug("The session file is invalid: " + ex); }
|
||||||
|
|
||||||
@ -294,7 +295,7 @@ SessionStartup.prototype = {
|
|||||||
|
|
||||||
return content.replace(/\r\n?/g, "\n");
|
return content.replace(/\r\n?/g, "\n");
|
||||||
}
|
}
|
||||||
catch (ex) { Components.utils.reportError(ex); }
|
catch (ex) { Cu.reportError(ex); }
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user