Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/sendReport.js

Issue 9050033: Issue reporter broken due to bug 664695 (Closed)
Patch Set: Created Dec. 18, 2012, 2:46 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/errors.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/content/errors.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld