commit | b5d3afadb502337b5710cf0be95d3befa003d6a9 | [log] [tgz] |
---|---|---|
author | Bartek Nowierski <bartekn@chromium.org> | Fri Nov 19 22:47:29 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 19 22:47:29 2021 |
tree | 1a56dc9f4aecdef97dd4c92e2bf4a34a16f0b531 | |
parent | 9f9bf56f452ae488d67d10f3370768382e2faa54 [diff] |
Move raw_ptr support check from StorageTraits to UnretainedWrapper In the current code, UnretainedWrapper::ptr_ would be unconditionally rewritten from T* to raw_ptr<T> during Big Rewrite. This would break if T isn't supported by raw_ptr<>. Compatibility check in StorageTraits was supposed to counteract that, but it wouldn't catch direct calls to base::Unretained(). Better to move the check to UnretainedWrapper, where it will handle all cases, by defining RawPtrTraits. The rewriter won't touch T* in RawPtrTraits, because it's part of the `using` clause. It is ok to have raw_ptr<T> in the current codebase, because without use_backup_ref_ptr=true it uses NoOpImpl, thus incurring no cost. Bug: 1237534, 1080832 Change-Id: I31991c3455c92e3358aa26924b70515fb99417de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3290780 Reviewed-by: Ćukasz Anforowicz <lukasza@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/main@{#943703}
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.