• Wojciech Dzierżanowski's avatar
    Postpone binding of mojom::DataReductionProxy · 4538080a
    Wojciech Dzierżanowski authored
    Each Web Worker runs on a separate worker thread, and each worker has an
    associated URLLoaderThrottleProvider.  When spawning a nested worker,
    the outer worker's throttle provider is cloned on the outer worker's
    thread and then used on the inner worker's thread.
    
    To accomodate this scenario:
    
     - Postpone the creation of DataReductionProxyThrottleManager until a
       moment when we are running on the target thread.  This makes sure
       the DataReductionProxyThrottleConfigObserver binding is used on the
       same thread that it's created on.
    
     - Postpone the binding of DataReductionProxy until a moment when we
       are running on the target thread.  DataReductionProxyPtrInfo
       serves as a holder of the interface request that can move between
       threads.
    
    Bug: 942011
    Change-Id: Ieed17fb499bbcb0545e3e0323f751c1ea55a33d5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1565873Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
    Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
    Cr-Commit-Position: refs/heads/master@{#654846}
    4538080a
url_loader_throttle_provider_impl.cc 11.1 KB