-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[base] Protect thread-safe refcounts against overflow.
Implementing tests for this also tickled a surprising edge case in the way RefCounted/RefCountedThreadSafe signalled whether the refcount should begin at 0 or 1. Previously, this was signalled using a static data member; however, local classes (which the updated tests use) cannot contain static data members. As a result, this CL "minimally" updates the tagging mechanism to use a type alias while leaving as much of the existing tagging mechanism intact as possible. Bug: 1238642 Change-Id: I16f3ab243745e11bbde755f826d430e85cc33a93 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3131643 Reviewed-by: Lei Zhang <thestig@chromium.org> Owners-Override: Lei Zhang <thestig@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1071489}
- Loading branch information
1 parent
0276a9c
commit 5c8cdc9
Showing
6 changed files
with
131 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters