Timeline frontend should not crash on tracks without threads.

This edge-case is hit on profiles generated by headless chrome:
* These traces hit the "generic" codepath because the tracing handler
  is started through browser_devtools_agent_host, without a frame tree
* In TimelineModel.js _processEvent will ensure the Timings track
  exists, but will not associate a thread with it.

This change fixes the crash and allows these types of profiles to load
but isn't perfect because the Timings track will not be shown in this
situation. I tried to get the Timings track to show up but wasn't
familiar enough with the code to get it working.

Bug: 943361
Change-Id: Iedfcf93d65a9a8cb31df20710aa19c7c967217f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529877
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642084}
1 file changed