commit | 0a949c32fdae347d569277ff1465574dca55fe88 | [log] [tgz] |
---|---|---|
author | Daniel Cheng <dcheng@chromium.org> | Fri Apr 21 02:38:28 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Apr 21 02:38:28 2023 |
tree | 9437b490f548cb83bf488e6ad985afdedb60d97e | |
parent | 58e24ad722acca87faeeb0ef9fac6819297673b5 [diff] |
Fix dangling pointer issues in MediaRouterUiForTestBase. MediaRouterUiForTestBase currently holds a pointer to a MediaRouterDialogControllerViews, which is a WebContentsUserData subclass. However, several MediaRouterUiForTestBase implementations are also WebContentsUserData subclasses. This turns out to be problematic for dangling pointers, because the order of destruction of different WebContentsUserDatas registered with the same WebContents is *not* guaranteed. It turns out that the various MediaRouterUiForTestBase subclasses don't need to be WebContentsUserData and can simply be strongly owned by the test fixture instead. This fixes the dangling pointer errors triggered by the undefined order of destruction of WebContentsUserDatas, and, as a bonus, fixes an untriaged dangling pointer error. Bug: 1121345 Change-Id: I1cfc624dbae69d0ab94af62cffa77805b1e23cf1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4451567 Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Takumi Fujimoto <takumif@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1133564}
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.