mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 02:21:05 +08:00
I noticed that in c++ I had to manually add an extra backslash to escape the message in codegen, so I checked and saw that in: https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/generated/Deprecation.ts;drc=6b47192b2e719a562ef1a88e19bc7572e6a187ab;l=16 CanRequestURLHTTPContainingNewline had `\(n|r|t)` as part of the message, but that once the string was extracted in: https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/third_party/lighthouse/locales/en-US.json;drc=de6c4e5973980ad98d7d1699faa4e1059f102c4d;l=2120 it became `(n|r|t)` because \( isn't a valid javascript escape. I added the same fix I did in c++ and replaced \ with \\ in the codegen to preserve the intended escape that's lost in the python string decode. Bug: 1411444 Change-Id: Iead1a2909a63eba3ea39c5f0524c63fb532534de DISABLE_THIRD_PARTY_CHECK=Fixing codegen Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4240938 Reviewed-by: Simon Zünd <szuend@chromium.org> Auto-Submit: Ari Chivukula <arichiv@chromium.org> Commit-Queue: Ari Chivukula <arichiv@chromium.org>