| Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
|
| index 14ea9163233aac7ca023995c716cda4d134ea920..e893a975e16b82d96f9783b4443754cad7cd0f89 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
|
| @@ -1192,8 +1192,12 @@ WebInspector.ConsoleCommand.prototype = {
|
| this._formattedCommand.textContent = this.text.replaceControlCharacters();
|
| this._element.appendChild(this._formattedCommand);
|
|
|
| - var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter("text/javascript", true);
|
| - javascriptSyntaxHighlighter.syntaxHighlightNode(this._formattedCommand).then(this._updateSearch.bind(this))
|
| + if (this._formattedCommand.textContent.length < WebInspector.ConsoleCommand.MaxLengthToIgnoreHighlighter) {
|
| + var javascriptSyntaxHighlighter = new WebInspector.DOMSyntaxHighlighter("text/javascript", true);
|
| + javascriptSyntaxHighlighter.syntaxHighlightNode(this._formattedCommand).then(this._updateSearch.bind(this))
|
| + } else {
|
| + this._updateSearch();
|
| + }
|
| }
|
| return this._element;
|
| },
|
| @@ -1207,6 +1211,13 @@ WebInspector.ConsoleCommand.prototype = {
|
| }
|
|
|
| /**
|
| + * The maximum length before strings are considered too long for syntax highlighting.
|
| + * @const
|
| + * @type {number}
|
| + */
|
| +WebInspector.ConsoleCommand.MaxLengthToIgnoreHighlighter = 10000;
|
| +
|
| +/**
|
| * @constructor
|
| * @extends {WebInspector.ConsoleViewMessage}
|
| * @param {!WebInspector.ConsoleMessage} message
|
|
|