commit | b5c5c86c21a0bf51cc910e0b62611aea45aa0b0d | [log] [tgz] |
---|---|---|
author | Nate Chapin <japhet@chromium.org> | Tue May 29 17:47:40 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue May 29 17:47:40 2018 |
tree | 3bdd5b33ed90f0842ac8723507991ab8e593a9e2 | |
parent | 66d69d2841126c91f2bcf9660163e450fe217109 [diff] |
CORS for sync redirects Historically, synchronous fetches have had no associated ResourceClient. This made no difference, because synchronous fetches blocked until the fetch completed, so there would be no callbacks to listen to until the function was ready to return anyway. However, now we perform the synchronous fetch on a utility thread, and https://chromium.googlesource.com/chromium/src.git/+/4bd024a4e885ced5d79f19c4e950c7ffb9ee29b0 allows us to unblock and re-block the requesting thread in order to perform redirect checks. Before this CL, the redirect handling can only process checks that don't require access to the ResourceClient (like CSP). This CL allows DocumentThreadableLoader to register itself as a ResourceClient on a sync fetch, so that it can perform CORS checks on sync requests. Because DocumentThreadableLoader now gets ResourceClient callbacks for sync requests, DocumentThreadableLoader::LoadRequestSync is substantially simpler. Bug: 706331 Change-Id: I3031b8068b3501f7f8f7bf19e4ab46ad7b59e83a Reviewed-on: https://chromium-review.googlesource.com/1067745 Commit-Queue: Nate Chapin <japhet@chromium.org> Reviewed-by: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#562496}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .