Index: chrome/content/ui/sendReport.js |
=================================================================== |
--- a/chrome/content/ui/sendReport.js |
+++ b/chrome/content/ui/sendReport.js |
@@ -612,19 +612,22 @@ let framesDataSource = |
let errorsDataSource = |
{ |
collectData: function(wnd, windowURI, callback) |
{ |
let {addonID} = require("info"); |
addonID = addonID.replace(/[\{\}]/g, ""); |
- let messages = {}; |
- Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).getMessageArray(messages, {}); |
- messages = messages.value || []; |
+ // 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 = Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService).getMessageArray(outparam, {}); |
+ messages = messages || outparam.value || []; |
messages = messages.filter(function(message) |
{ |
return (message instanceof Ci.nsIScriptError && |
!/^https?:/i.test(message.sourceName) && |
(/adblock/i.test(message.errorMessage) || /adblock/i.test(message.sourceName) || |
message.errorMessage.indexOf(addonID) >= 0 || message.sourceName.indexOf(addonID) >= 0)); |
}); |
if (messages.length > 10) // Only the last 10 messages |