Bug 1042919: Catch errors in isPlatformCompatible and report them via Telemetry; r=mossop

This commit is contained in:
Irving Reid 2014-08-28 09:22:52 -04:00
parent 0e0ad75589
commit 4759183a0e

View File

@ -6133,6 +6133,8 @@ AddonInternal.prototype = {
}
catch (e) { }
// Something is causing errors in here
try {
for (let platform of this.targetPlatforms) {
if (platform.os == Services.appinfo.OS) {
if (platform.abi) {
@ -6145,6 +6147,14 @@ AddonInternal.prototype = {
}
}
}
} catch (e) {
let message = "Problem with addon " + this.id + " targetPlatforms "
+ JSON.stringify(this.targetPlatforms);
logger.error(message, e);
AddonManagerPrivate.recordException("XPI", message, e);
// don't trust this add-on
return false;
}
return matchedOS && !needsABI;
},