mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
fde3087a8e
--HG-- rename : toolkit/components/startup/tests/Makefile.in => toolkit/components/startup/tests/browser/Makefile.in extra : rebase_source : 8df6b163173362ae80832eb3667e04bb817280b3
58 lines
1.7 KiB
JavaScript
58 lines
1.7 KiB
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
const XULRUNTIME_CONTRACTID = "@mozilla.org/xre/runtime;1";
|
|
const XULRUNTIME_CID = Components.ID("7685dac8-3637-4660-a544-928c5ec0e714}");
|
|
|
|
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
|
|
let gAppInfo = null;
|
|
|
|
function createAppInfo(id, name, version, platformVersion) {
|
|
gAppInfo = {
|
|
// nsIXULAppInfo
|
|
vendor: "Mozilla",
|
|
name: name,
|
|
ID: id,
|
|
version: version,
|
|
appBuildID: "2007010101",
|
|
platformVersion: platformVersion ? platformVersion : "1.0",
|
|
platformBuildID: "2007010101",
|
|
|
|
// nsIXULRuntime
|
|
inSafeMode: false,
|
|
logConsoleErrors: true,
|
|
OS: "XPCShell",
|
|
replacedLockTime: 0,
|
|
XPCOMABI: "noarch-spidermonkey",
|
|
invalidateCachesOnRestart: function invalidateCachesOnRestart() {
|
|
// Do nothing
|
|
},
|
|
|
|
// nsICrashReporter
|
|
annotations: {
|
|
},
|
|
|
|
annotateCrashReport: function(key, data) {
|
|
this.annotations[key] = data;
|
|
},
|
|
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIXULAppInfo,
|
|
Ci.nsIXULRuntime,
|
|
Ci.nsICrashReporter,
|
|
Ci.nsISupports])
|
|
};
|
|
|
|
let XULAppInfoFactory = {
|
|
createInstance: function (outer, iid) {
|
|
if (outer != null)
|
|
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
|
return gAppInfo.QueryInterface(iid);
|
|
}
|
|
};
|
|
let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
|
registrar.registerFactory(XULRUNTIME_CID, "XULRuntime",
|
|
XULRUNTIME_CONTRACTID, XULAppInfoFactory);
|
|
|
|
}
|