mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-27 16:35:54 +08:00
1. Extract root-causes from internal repository. There is no plan to modify the internal repository to use this iteration. Only LayoutShift.ts is extracted (leaving just LCP.ts root causes). 2. Replace usages of CDT SDK / services with a generic protocol interface. This root cause logic needs to be usable outside DevTools (for Lighthouse), so the SDK / services are replaced with specific callbacks provided to the entry function. There are no immediate plans to utilize LayoutShift root cause functionality directly in this repo, so creating an interface using the SDK is deferred (though it should be trivial) until needed (likely for the LCP root cause / breakdown). 3. Refactor RootCauses functionality to a class, instead of passing around a "protocolInterace" object through all the methods. 4. Add `initiator` to RendererHandler's `TraceEntryNode`. This is exactly as the internal variant of this Handler did it. Bug: 1477187 Change-Id: Ia6e51eacef527fa73809dd4336fb1886f20e2410 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5013616 Reviewed-by: Andres Olivares <andoli@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Connor Clark <cjamcl@chromium.org>