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

Delta Between Two Patch Sets: chrome/content/errors.html

Issue 6519778499887104: Issue 2010 - Remove some uses of "for each" with "for of" (Closed)
Left Patch Set: Created Feb. 18, 2015, 1:32 p.m.
Right Patch Set: Created Feb. 26, 2015, 11:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | chrome/content/ui/composer.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <html> 3 <html>
4 <head> 4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <title>Adblock Plus Errors</title> 6 <title>Adblock Plus Errors</title>
7 <style type="text/css"> 7 <style type="text/css">
8 .warning, .error 8 .warning, .error
9 { 9 {
10 border: 1px dashed black; 10 border: 1px dashed black;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return (message instanceof Components.interfaces.nsIScriptError && 58 return (message instanceof Components.interfaces.nsIScriptError &&
59 !/^https?:/i.test(message.sourceName) && 59 !/^https?:/i.test(message.sourceName) &&
60 (/adblock/i.test(message.errorMessage) || /adblock/i.test(message.sour ceName) || 60 (/adblock/i.test(message.errorMessage) || /adblock/i.test(message.sour ceName) ||
61 id && (message.errorMessage.indexOf(id) >= 0 || message.sourceName && message.sourceName.indexOf(id) >= 0))); 61 id && (message.errorMessage.indexOf(id) >= 0 || message.sourceName && message.sourceName.indexOf(id) >= 0)));
62 }); 62 });
63 63
64 if (messages.length) 64 if (messages.length)
65 { 65 {
66 document.write("<p>Errors related to Adblock Plus:</p>"); 66 document.write("<p>Errors related to Adblock Plus:</p>");
67 67
68 for each (let message in messages) 68 for (let message of messages)
69 { 69 {
70 let type = (message.flags & Components.interfaces.nsIScriptError.warning Flag ? "warning" : "error"); 70 let type = (message.flags & Components.interfaces.nsIScriptError.warning Flag ? "warning" : "error");
71 let html = "<b>" + (type == "warning" ? "Warning:" : "Error:") + "</b><b r>"; 71 let html = "<b>" + (type == "warning" ? "Warning:" : "Error:") + "</b><b r>";
72 html += encodeHTML(message.errorMessage) + "<br><br>"; 72 html += encodeHTML(message.errorMessage) + "<br><br>";
73 if (message.sourceLine) 73 if (message.sourceLine)
74 html += "Source line: " + encodeHTML(message.sourceLine) + "<br>"; 74 html += "Source line: " + encodeHTML(message.sourceLine) + "<br>";
75 if (message.sourceName) 75 if (message.sourceName)
76 html += "Location: " + encodeHTML(message.sourceName) + " line " + mes sage.lineNumber + "<br>"; 76 html += "Location: " + encodeHTML(message.sourceName) + " line " + mes sage.lineNumber + "<br>";
77 html = html.replace(/(<br>)+$/, ""); 77 html = html.replace(/(<br>)+$/, "");
78 document.write("<div class='" + type + "'>" + 78 document.write("<div class='" + type + "'>" +
(...skipping 23 matching lines...) Expand all
102 function clearErrors() 102 function clearErrors()
103 { 103 {
104 Components.classes["@mozilla.org/consoleservice;1"] 104 Components.classes["@mozilla.org/consoleservice;1"]
105 .getService(Components.interfaces.nsIConsoleService) 105 .getService(Components.interfaces.nsIConsoleService)
106 .reset(); 106 .reset();
107 window.location.reload(); 107 window.location.reload();
108 } 108 }
109 </script> 109 </script>
110 </body> 110 </body>
111 </html> 111 </html>
LEFTRIGHT

Powered by Google App Engine
This is Rietveld