Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 this._messages = []; | 43 this._messages = []; |
| 44 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ | 44 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ |
| 45 this._messageByExceptionId = new Map(); | 45 this._messageByExceptionId = new Map(); |
| 46 this._warnings = 0; | 46 this._warnings = 0; |
| 47 this._errors = 0; | 47 this._errors = 0; |
| 48 this._revokedErrors = 0; | 48 this._revokedErrors = 0; |
| 49 this._logAgent = logAgent; | 49 this._logAgent = logAgent; |
| 50 if (this._logAgent) { | 50 if (this._logAgent) { |
| 51 target.registerLogDispatcher(new WebInspector.LogDispatcher(this)); | 51 target.registerLogDispatcher(new WebInspector.LogDispatcher(this)); |
| 52 this._logAgent.enable(); | 52 this._logAgent.enable(); |
| 53 if (!InspectorFrontendHost.isUnderTest()) | 53 if (!InspectorFrontendHost.isUnderTest()) { |
| 54 this._logAgent.setReportViolationsEnabled(true); | 54 this._logAgent.startViolationsReport([ |
| 55 {name: 'longTask', threshold: 50 }, | |
|
caseq
2016/11/09 00:41:12
nit: I'd extract a static var for it and call it .
pfeldman
2016/11/09 01:39:14
Acknowledged.
| |
| 56 {name: 'longLayout', threshold: 30}, | |
| 57 {name: 'blockedEvent', threshold: 100}]); | |
| 58 } | |
| 55 } | 59 } |
| 56 } | 60 } |
| 57 | 61 |
| 58 /** | 62 /** |
| 59 * @param {!WebInspector.ExecutionContext} executionContext | 63 * @param {!WebInspector.ExecutionContext} executionContext |
| 60 * @param {string} text | 64 * @param {string} text |
| 61 * @param {boolean=} useCommandLineAPI | 65 * @param {boolean=} useCommandLineAPI |
| 62 */ | 66 */ |
| 63 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) { | 67 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) { |
| 64 var target = executionContext.target(); | 68 var target = executionContext.target(); |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 637 */ | 641 */ |
| 638 _commandEvaluated(event) { | 642 _commandEvaluated(event) { |
| 639 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua ted, event.data); | 643 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua ted, event.data); |
| 640 } | 644 } |
| 641 }; | 645 }; |
| 642 | 646 |
| 643 /** | 647 /** |
| 644 * @type {!WebInspector.MultitargetConsoleModel} | 648 * @type {!WebInspector.MultitargetConsoleModel} |
| 645 */ | 649 */ |
| 646 WebInspector.multitargetConsoleModel; | 650 WebInspector.multitargetConsoleModel; |
| OLD | NEW |