Fix possible shutdown leak in SerialWorker
SerialWorker instances could leak when the original task runner is shutting down and no longer accepting tasks. This is because of the implementation of ~PostTaskAndReplyRelay, which attempts to destroy its own instance by DeleteSoon, which is also not accepted by the task runner. This behavior produces warnings in ASAN builds, for example when an instance of DnsConfigServicePosix::HostsReader is destroyed in services_unittests.NetworkContextTest. BUG=879152 Change-Id: I48df8e3171975ff6f11fe0676e456f8e8b756ec9 Reviewed-on: https://chromium-review.googlesource.com/1193344Reviewed-by:Bence Béky <bnc@chromium.org> Commit-Queue: Bence Béky <bnc@chromium.org> Cr-Commit-Position: refs/heads/master@{#588499}
Showing
Please register or sign in to comment