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(); |
}, |