Bug 1085162 - Make the original appinfo instance a prototype of the fake on in telemetry tests. r=froydnj

This commit is contained in:
Georg Fritzsche 2014-10-19 22:34:33 +02:00
parent 0bc6be7e7f
commit 61970d7604

View File

@ -6,6 +6,8 @@
const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1";
const XULAPPINFO_CID = Components.ID("{c763b610-9d49-455a-bbd2-ede71682a1ac}");
let gAppInfo;
let gOldAppInfo = Components.classes[XULAPPINFO_CONTRACTID]
.getService(Components.interfaces.nsIXULRuntime);
function createAppInfo(id, name, version, platformVersion) {
gAppInfo = {
@ -40,6 +42,8 @@ function createAppInfo(id, name, version, platformVersion) {
Ci.nsISupports])
};
Object.setPrototypeOf(gAppInfo, gOldAppInfo);
var XULAppInfoFactory = {
createInstance: function (outer, iid) {
if (outer != null)