commit | 03c0d7ad4ce28a42bc6069a900246baa93b437b0 | [log] [tgz] |
---|---|---|
author | Matt Menke <mmenke@chromium.org> | Thu May 23 13:24:26 2024 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 23 13:24:26 2024 |
tree | b43ba6206af5ef06c10fe6ee2a620baedee3a7b9 | |
parent | 85f3b33b065918d40171a6e71269183db937efa1 [diff] |
Remove DanglingUntriaged from MultiThreadedProxyResolver::Job classes. Each refcounted CreateResolverJob is run by a single Executor on its own thread. When the Executor is destroyed on the main thread, it joins the Job's thread to the main thread, cancels the job, and is then destroyed. The problem is that CreateResolverJob are refcounted, and there may be a pending completion task that owns a pointer to the Job. The tasks themselves will, if run, notice they're cancelled and do nothing, but the Jobs still have raw pointers to objects they don't own. This CL makes CreateResolverJobs override its Job::Cancel() and clear their pointers when it's invoked. Since Executor calls Cancel() strictly after joining the Job's thread, this is safe, and it should prevent any danging pointer warnings. This CL also makes GetProxyForURLJobs clear their raw pointer in an overridden Cancel() call. They're much simpler - those Jobs are owned by RequestImpls, whose owners also own the request_ they have a raw pointer to. Bug: 40212619 Change-Id: Id864fe845182ccde3a5b6c626076cbf07c55d8f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5530196 Reviewed-by: Adam Rice <ricea@chromium.org> Commit-Queue: mmenke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/main@{#1305031}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.