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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js

Issue 2573303002: DevTools: don't report violations in the error/warning counter. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (msg._exceptionId) 149 if (msg._exceptionId)
150 this._messageByExceptionId.set(msg._exceptionId, msg); 150 this._messageByExceptionId.set(msg._exceptionId, msg);
151 this._incrementErrorWarningCount(msg); 151 this._incrementErrorWarningCount(msg);
152 this.dispatchEventToListeners(SDK.ConsoleModel.Events.MessageAdded, msg); 152 this.dispatchEventToListeners(SDK.ConsoleModel.Events.MessageAdded, msg);
153 } 153 }
154 154
155 /** 155 /**
156 * @param {!SDK.ConsoleMessage} msg 156 * @param {!SDK.ConsoleMessage} msg
157 */ 157 */
158 _incrementErrorWarningCount(msg) { 158 _incrementErrorWarningCount(msg) {
159 if (msg.source === SDK.ConsoleMessage.MessageSource.Violation)
160 return;
159 switch (msg.level) { 161 switch (msg.level) {
160 case SDK.ConsoleMessage.MessageLevel.Warning: 162 case SDK.ConsoleMessage.MessageLevel.Warning:
161 this._warnings++; 163 this._warnings++;
162 break; 164 break;
163 case SDK.ConsoleMessage.MessageLevel.Error: 165 case SDK.ConsoleMessage.MessageLevel.Error:
164 this._errors++; 166 this._errors++;
165 break; 167 break;
166 case SDK.ConsoleMessage.MessageLevel.RevokedError: 168 case SDK.ConsoleMessage.MessageLevel.RevokedError:
167 this._revokedErrors++; 169 this._revokedErrors++;
168 break; 170 break;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 */ 638 */
637 _commandEvaluated(event) { 639 _commandEvaluated(event) {
638 this.dispatchEventToListeners(SDK.ConsoleModel.Events.CommandEvaluated, even t.data); 640 this.dispatchEventToListeners(SDK.ConsoleModel.Events.CommandEvaluated, even t.data);
639 } 641 }
640 }; 642 };
641 643
642 /** 644 /**
643 * @type {!SDK.MultitargetConsoleModel} 645 * @type {!SDK.MultitargetConsoleModel}
644 */ 646 */
645 SDK.multitargetConsoleModel; 647 SDK.multitargetConsoleModel;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698