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

This commit is contained in:
Georg Fritzsche 2014-10-19 22:30:51 +02:00
parent aa924452e4
commit bb14728fc9

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)