Files
react-native-devtools-frontend/front_end/models
Jack Franklin a786458ee0 Move LayoutShiftHandler SDK code into SDKServices
As part of running the trace engine in a worker we need to remove all
SDK code from the handlers. We can run the SDK in a worker, however we
cannot pass instances of `SDK.DOMModel.DOMNode` between the worker and
the main thread easily. We also felt that it was messy having the
handlers contain SDK code, so this was a nice refactor in that regard
also.

This CL creates `model/trace/sdk_services` which contain some generic
helpers and then handler specific code to run on trace events and return
some useful data. Each service caches its result, so we can call it
multiple times without repeating work, and the cache is keyed on the
overall `TraceParseData`, so there's no danger of different traces
colliding in the cache.

This CL doesn't move all SDK logic out of handlers - there is more in
other handlers, but I will remove those in a follow-up once we're happy
with this approach and this CL has landed.

Bug: 1399455
Change-Id: Iba2fea8ed1b2d5a29ac97ef78130034bf801bdf3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4085486
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2022-12-08 15:14:10 +00:00
..
2022-11-21 15:14:06 +00:00
2022-12-07 06:09:42 +00:00
2022-01-14 16:41:50 +00:00