Index: chrome/content/errors.html |
=================================================================== |
--- a/chrome/content/errors.html |
+++ b/chrome/content/errors.html |
@@ -8,22 +8,22 @@ |
.warning, .error |
{ |
border: 1px dashed black; |
margin: 5px; |
padding: 2px; |
white-space: pre-wrap; |
} |
- .error |
+ .error |
{ |
background-color: #fff0f0; |
} |
- .warning |
+ .warning |
{ |
background-color: #ffffe0; |
} |
button |
{ |
float: right; |
} |
@@ -48,22 +48,24 @@ |
let text = "You are running Adblock Plus " + addonVersion; |
text += "."; |
document.write("<p>" + text + "</p>"); |
id = addonID.replace(/[\{\}]/g, ""); |
} catch (e) {} |
- let messages = {}; |
- Components.classes["@mozilla.org/consoleservice;1"] |
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=664695 - starting with |
+ // Gecko 19 this function returns the result, before that it wrote to a |
+ // parameter. |
+ let outparam = {}; |
+ let messages = Components.classes["@mozilla.org/consoleservice;1"] |
.getService(Components.interfaces.nsIConsoleService) |
- .getMessageArray(messages, {}); |
- messages = messages.value || []; |
- |
+ .getMessageArray(outparam, {}); |
+ messages = messages || outparam.value || []; |
messages = messages.filter(function(message) |
{ |
return (message instanceof Components.interfaces.nsIScriptError && |
!/^https?:/i.test(message.sourceName) && |
(/adblock/i.test(message.errorMessage) || /adblock/i.test(message.sourceName) || |
id && (message.errorMessage.indexOf(id) >= 0 || message.sourceName.indexOf(id) >= 0))); |
}); |