mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1042919: Catch errors in isPlatformCompatible and report them via Telemetry; r=mossop
This commit is contained in:
parent
0e0ad75589
commit
4759183a0e
@ -6133,17 +6133,27 @@ AddonInternal.prototype = {
|
||||
}
|
||||
catch (e) { }
|
||||
|
||||
for (let platform of this.targetPlatforms) {
|
||||
if (platform.os == Services.appinfo.OS) {
|
||||
if (platform.abi) {
|
||||
needsABI = true;
|
||||
if (platform.abi === abi)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
matchedOS = true;
|
||||
// Something is causing errors in here
|
||||
try {
|
||||
for (let platform of this.targetPlatforms) {
|
||||
if (platform.os == Services.appinfo.OS) {
|
||||
if (platform.abi) {
|
||||
needsABI = true;
|
||||
if (platform.abi === abi)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
matchedOS = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} 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;
|
||||
|
Loading…
Reference in New Issue
Block a user