mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-12 17:45:49 +08:00
The JS profiler panel is registered in timeline-meta and js_profiler-meta, however the only action that defines the panel as its contextType (profiler.js-toggle-recording) was registered in profiler-meta. This means that the panel would be loaded in different meta files and thus, the action would never be effectively available because its context types are not loaded in its local meta files. Back when the extensions were registered with the module.json system this was not a problem because the context types were loaded to the global scope, and so they were module-independent in this sense. To make the action 'available' when the js profiler panel is loaded, we need access to the cached module that is loaded when the panel is, and so we move the action's registration to timeline and js_profiler meta files. Fixed: 1197204 Bug: 1177004 Change-Id: Ic26adbe706ec351b46ab5494da1c4d3c7d64d514 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2818218 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Andres Olivares <andoli@chromium.org>