Skip to content

Commit

Permalink
Merge pull request #9066 from Katharine/limit-dom-madness
Browse files Browse the repository at this point in the history
Avoid highlighting diffs in pathological logs.
  • Loading branch information
k8s-ci-robot authored Aug 16, 2018
2 parents fdea22f + 7536cc2 commit ea66d20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions triage/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ function renderSpans(text, spans) {
if (!spans) {
return [text];
}
if (spans.length > 1000) {
console.warn(`Not highlighting excessive number of spans to avoid browser hang: ${spans.length}`);
return [text];
}
var out = [];
var c = 0;
for (var i = 0; i < spans.length; i += 2) {
Expand Down

0 comments on commit ea66d20

Please sign in to comment.