mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 09:17:09 +08:00
Whenever CDP adds a new event type, historically DevTools would error on its introduction. The InspectorBackend would write to `console.error`, which breaks Chromium tests. However, we guarantee type-safety with TypeScript and our version of CDP. Since CDP is backwards compatible, it is okay if DevTools encounters an event it does not know about. Thus, we can rely solely on the compile-time check for our dispatchers and lower the protocol error to a warning instead. We still warn on its usage, so that Chromium engineers know that their version of CDP is out-of-date to the one DevTools is built, as well as additional debugging information for when DevTools users run into issues. R=sigurds@chromium.org,wolfi@chromium.org Fixed: 1144171 Change-Id: Ide8e3abf53050ac836c01aa4b496e81cd00e9a72 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2565570 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Wolfgang Beyer <wolfi@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>