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

Unified Diff: chrome/content/errors.html

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 | « no previous file | chrome/content/ui/sendReport.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
});
« no previous file with comments | « no previous file | chrome/content/ui/sendReport.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld