commit | e98d214c48dd94a2b4363b384e952a32258b9487 | [log] [tgz] |
---|---|---|
author | Arthur Sonzogni <[email protected]> | Thu Jun 01 15:02:25 2023 |
committer | Chromium LUCI CQ <[email protected]> | Thu Jun 01 15:02:25 2023 |
tree | 4ba4f7003f749ba46ea7268a3e7c704322443bcb | |
parent | 0847bf86459cd51bb1299a994100fd412493dd11 [diff] [blame] |
DanglingPointer: annotate for unittests base+linux [1/N] The DanglingPointerDetector is configured only when the test enters the ContentMain function. See https://crbug.com/1400059 I would like to configure it no matter the kind of test. For this to happen, we need to annotate every pre-existing dangling pointers. This patch annotates the ones you can find by running targets depending on the GoogleTest library. Statistic: This adds 1776 new DanglingUntriaged. Among them: - 1288 are in unittests. - 488 are in implementation. To produce those numbers, I used the command: ```bash git diff annotate-linux origin/main -- "*test*" | grep "DanglingUntriaged" | wc -l ``` This patch has been generated by: 1. Apply the "auto-annotator" patch: https://chromium-review.googlesource.com/c/chromium/src/+/4474553 2. Compile the compiler again: ```bash ./tools/clang/scripts/build.py ``` 3. List and run all the targets. You can use a bash script like: https://docs.google.com/document/d/1AMMERcqy0eafFWopUCHYsIKIKEp3J8DFxqW9UIbzIHo 4. Concatenate output, filter by "Found dangling ptr", sort, remove duplicate. 5. Apply the rewriter script from: https://github.com/ArthurSonzogni/chrome-dangling-ptr-apply-edit 6. Revert the "auto-annotate" patch. 7. Apply `git cl format` AX-Relnotes: n/a. Bug: chromium:1400059 Change-Id: I217d5c0b925da5176fc53baf95919a3690f1e9a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4570424 Reviewed-by: danakj <[email protected]> Owners-Override: danakj <[email protected]> Commit-Queue: Arthur Sonzogni <[email protected]> Cr-Commit-Position: refs/heads/main@{#1151859}
diff --git a/components/permissions/chooser_controller.h b/components/permissions/chooser_controller.h index 53ae3bc..fc444c28 100644 --- a/components/permissions/chooser_controller.h +++ b/components/permissions/chooser_controller.h
@@ -177,7 +177,7 @@ private: std::u16string title_; - raw_ptr<View> view_ = nullptr; + raw_ptr<View, DanglingUntriaged> view_ = nullptr; }; } // namespace permissions