Network: Fix Har Importer

This CL fixes the requestsFromHARLog function. When the HARImporter.js
file was Typesciptified, it more strictly type checked access to
the maps generated when parsing the HAR files. However, this caused
the function to skip some intended fallbacks that were allowed by
the poorly typed JS: missing pagerefs in the HAR cause skips all together
instead of falling back to using the entry.request.url

This was causing the network tool to be unable to import HAR files it created.

This change restores the fallback behavior while maintainging typechecking.
(Repro steps in bug)

Original TS cl: https://crrev.com/c/2463356

Bug: 1158442
Change-Id: I7bc52fb90b91c4288dea1dd00702797a2ef4d0bd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2594147
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
1 file changed
tree: a4d7d1408cb56ef96247fa17dc7bd8d4444a51b8
  1. build_overrides/
  2. docs/
  3. front_end/
  4. inspector_overlay/
  5. node_modules/
  6. scripts/
  7. test/
  8. third_party/
  9. v8/
  10. .clang-format
  11. .editorconfig
  12. .eslintignore
  13. .eslintrc.js
  14. .gitattributes
  15. .gitignore
  16. .gn
  17. .npmignore
  18. .npmrc
  19. .style.yapf
  20. .stylelintignore
  21. .stylelintrc.json
  22. all_devtools_files.gni
  23. all_devtools_modules.gni
  24. AUTHORS
  25. BUILD.gn
  26. COMMON_OWNERS
  27. DEPS
  28. devtools_grd_files.gni
  29. devtools_image_files.gni
  30. devtools_module_entrypoints.gni
  31. ENG_REVIEW_OWNERS
  32. INFRA_OWNERS
  33. LICENSE
  34. LIGHTHOUSE_OWNERS
  35. OWNERS
  36. package-lock.json
  37. package.json
  38. PRESUBMIT.py
  39. README.md
  40. tsconfig.base.json
  41. tsconfig.json
  42. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.

Source code

The frontend is available on chromium.googlesource.com.

Design guidelines

Please be aware that DevTools follows additional development guidelines.

Issue triage

The issue triage guidelines can be found here.

Workflows

Instructions to set up, use, and maintain a DevTools frontend checkout can be found here.

Additional references

Source mirrors

DevTools frontend repository is mirrored on GitHub.

DevTools frontend is also available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES modules, so consuming this package in other tools may require some effort.

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Getting in touch