[devtools] Add CDP method to fetch resources
This CL adds a method to the Network domain that DevTools can use to fetch resources in a more secure way. Such resources are, for example, source maps, or files referenced by source maps. The improvement over the old implementation is that the fetch now is very similar to a fetch in the page and uses the correct settings for SiteForCookies and NIK. Initially, we had planed to change source map fetching to CORS, but this would be a breaking change, so due to COVID-19 and the hold on breaking changes, this CL uses a no-CORS fetch with CORB blocking disabled to fetch source maps. CORB-blocking must be disabled because source maps may be valid JSON. The front-end can provide a frame_id (in DevTools terms, a devtools frame token in Chromium terms) and the page will look for this frame id in its sub resources. The fetch will then occur using a loader that is very similar to the loaders for that frame. Change-Id: Ideb36adbd79b9a36e6d3333299dcd036eb7a1332 Bug: chromium:1069378 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027416 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:Mike West <mkwst@chromium.org> Reviewed-by:
Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Reviewed-by:
Matt Menke <mmenke@chromium.org> Reviewed-by:
Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#810177}
Showing
Please register or sign in to comment