[tools] Fix loading old RCS.json files in callstats.html

Change-Id: Ica7e51e8d3e2d41edb0ad98b77e5213fb5f6515a
No-Try: True
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3763864
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81747}
This commit is contained in:
Camillo Bruni 2022-07-15 10:48:39 +02:00 committed by V8 LUCI CQ
parent f3737bbb12
commit 99208cdab2

View File

@ -1560,7 +1560,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
// { PAGE: [[metric_name, ...], [...], ]}
// Also, make sure we don't have the versioned array-style:
// { VERSION: { PAGE: [[metric_name, ...], [...], ]}, ...}
const innerArray = firstProperty(maybeMetrics);
const innerArray = firstProperty(maybeMetric);
if (Array.isArray(maybeMetric) && !Array.isArray(innerArray)) {
return {
[getFileName()]: json