Fix calculation of aggregated stats in performance tab
Fix calculation of aggregated stats in performance tab

If parent events end earlier than their child events, we wrongly
computed the aggregated stats. This adds a check to prevent this
from happening.

Bug: chromium:1066415, chromium:1014921
Change-Id: I821396d6e57210e2cb80fef0f443fbb78873148a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2150445
Reviewed-by: Peter Marshall <6d0eecbeb7fb9d172f49b4b32481d2466fd89429@chromium.org>
Commit-Queue: Kim-Anh Tran <a72f38a79b5fac6811022b8a7fb84830d856c9c9@chromium.org>

ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend