commit | 145f55243eb0d8c4d097d680b0f39518820ea0cc | [log] [tgz] |
---|---|---|
author | Wojciech Dzierżanowski <wdzierzanowski@opera.com> | Wed May 15 08:54:29 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed May 15 08:54:29 2019 |
tree | 4686c78d38cb52ed1f7da7dcf496114d81665678 | |
parent | 845351dfbd916bfe80de680c18bf97cc78665cf5 [diff] |
Handle sync loads with DRP's URLLoaderThrottle After https://chromium-review.googlesource.com/c/chromium/src/+/1565873, another interesting sequencing scenario is a synchronous load (as in blink::ResourceLoader::RequestSynchronously() triggered by a synchronous XMLHttpRequest() or WorkerGlobalScope.importScripts()). In this case, the URLLoaderThrottle is not used on the sequence where it was created (see https://chromium-review.googlesource.com/c/chromium/src/+/631040/). If it calls back to the throttle manager (manager_->MarkProxiesAsBad()), we're trying to make a mojo call on the wrong sequence again. The solution is similar to safe_browsing::RendererURLLoaderThrottle: "private" mojo pipes to mojom::DataReductionProxy. We take care to make them private in the synchronous load case only: it's not unusual for a single renderer to create tens of throttles, but only a small percentage of those is for a synchronous load (and there should be fewer and fewer of them given that synchronous XHR is deprecated). Bug: 963353 Change-Id: Ie502b881e946d188d6613119de02b1f6c0874a30 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1609834 Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com> Reviewed-by: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#659873}
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 .