Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1815)

Unified Diff: Source/devtools/front_end/main/Main.js

Issue 1095943002: DevTools: [console] Logged promise rejections do not change state once handled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: for landing Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/console/consoleView.css ('k') | Source/devtools/front_end/sdk/ConsoleModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/Main.js
diff --git a/Source/devtools/front_end/main/Main.js b/Source/devtools/front_end/main/Main.js
index 5e1e72ae43da027f7ffe362d168f187b05f4ced1..e7018380eff2a2ac17db138504593d6aac3ece92 100644
--- a/Source/devtools/front_end/main/Main.js
+++ b/Source/devtools/front_end/main/Main.js
@@ -789,7 +789,8 @@ WebInspector.__defineGetter__("inspectedPageURL", function()
*/
WebInspector.Main.WarningErrorCounter = function()
{
- this._counter = new WebInspector.ToolbarCounter(["error-icon", "warning-icon"]);
+ this._counter = new WebInspector.ToolbarCounter(["error-icon", "revokedError-icon", "warning-icon"]);
+ WebInspector.Main.WarningErrorCounter._instanceForTest = this._counter;
this._counter.addEventListener("click", showConsole);
function showConsole()
@@ -805,14 +806,17 @@ WebInspector.Main.WarningErrorCounter.prototype = {
_updateErrorAndWarningCounts: function()
{
var errors = 0;
+ var revokedErrors = 0;
var warnings = 0;
var targets = WebInspector.targetManager.targets();
for (var i = 0; i < targets.length; ++i) {
- errors = errors + targets[i].consoleModel.errors;
- warnings = warnings + targets[i].consoleModel.warnings;
+ errors += targets[i].consoleModel.errors();
+ revokedErrors += targets[i].consoleModel.revokedErrors();
+ warnings += targets[i].consoleModel.warnings();
}
- this._counter.setCounter("error-icon", errors, WebInspector.UIString(errors > 1 ? "%d errors" : "%d error", errors));
- this._counter.setCounter("warning-icon", warnings, WebInspector.UIString(warnings > 1 ? "%d warnings" : "%d warning", warnings));
+ this._counter.setCounter("error-icon", errors, WebInspector.UIString(errors === 1 ? "%d errors" : "%d error", errors));
+ this._counter.setCounter("revokedError-icon", revokedErrors, WebInspector.UIString(revokedErrors === 1 ? "%d handled promise rejections" : "%d handled promise rejection", revokedErrors));
+ this._counter.setCounter("warning-icon", warnings, WebInspector.UIString(warnings === 1 ? "%d warnings" : "%d warning", warnings));
WebInspector.inspectorView.toolbarItemResized();
},
« no previous file with comments | « Source/devtools/front_end/console/consoleView.css ('k') | Source/devtools/front_end/sdk/ConsoleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698