Implement ContextHostResolver::OnShutdown()
Cancels pending requests causing them to never complete, same as previous behavior for destroying the resolver. Allows stopping all requests at the start of URLRequestContext destruction to ensure the resolver stops working and stops any action that could depend upon destructing context objects. Since lots of inter-dependent context objects also have references back to the resolver, subsequent requests are also blocked to ensure problematic requests can not be triggered during context destruction. Subsequently-started requests (whether created before or after the OnShutdown() call) will always immediately fail with ERR_CONTEXT_SHUT_DOWN. More self-consistent would be for these requests to just hang as if they were started and cancelled, but this could break code making assumptions about requests that should always return a synchronous result. Bug: 1006902 Change-Id: Idd7fb60abbdd3b21bf4e6269db58dcef6e73b6cd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819494 Commit-Queue: Eric Orth <ericorth@chromium.org> Reviewed-by:Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#701353}
Showing
Please register or sign in to comment