commit | 41eb158d55c8ff1f35de96a3d4227938308390dd | [log][tgz] |
---|---|---|
author | Tom Sepez <tsepez@chromium.org> | Tue Sep 12 16:16:22 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Sep 12 16:16:22 2023 |
tree | 7c6322db67d1dc2d93ece393421e058e45b098ae | |
parent | 5b424e4ad4428c37fd3aeade57a92cf38db6d553[diff] |
Add PRESUBMIT rule about raw_ptrs and {}-style initialization.The uniform initializer syntax `{}` is problematic for raw_ptr<T>, asits meaning is different than when used with T*. For the T* case, itresults in null initialization, but for the raw_ptr<T> case, it resultsin default constructor initialization. The default constructor mayleave the member uninitialized under the NoOpImpl, so using `{}` doesnot result in the (presumably) intended null initialization.Change-Id:I2656722d51c5ac84d3f89648eca1c4d115657273Reviewed-on:https://chromium-review.googlesource.com/c/chromium/src/+/4856274Commit-Queue: Tom Sepez <tsepez@chromium.org>Reviewed-by: Daniel Cheng <dcheng@chromium.org>Cr-Commit-Position: refs/heads/main@{#1195439}
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 ishttps://www.chromium.org.
To check out the source code locally, don't usegit clone
! Instead, followthe instructions on how to get the code.
Documentation in the source is rooted indocs/README.md.
Learn how toGet 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 athttps://crbug.com/new.