forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some changes about storing/initializing hash table values
- Remove HashTraits::Store() because it's always slot = std::forward(value). A type with complex storage method should use HashTranslator. - Rename HashTranslator::Translate() to Store() to make its meaning clearer. - Require the type to be trivially destructible when it uses DeletedValue() to avoid double destruction. - Remove HashTableBucketInitializer::Initialize() because it's only called after AllocateTable() which has already initialized all entries. Found one violation with the third change. It's not a regression of recent HashTraits changes because assignment had been used in ConstructDeletedValue before the changes. The violation doesn't seem to have caused any problem probably because the internal sk_sp<> was always nullptr in the hash keys. Bug: 1374475 Change-Id: I4f3d0401bb3b3a4e1896c30d270204f08cb4c7d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4202669 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/main@{#1098651}
- Loading branch information
1 parent
5cfeaed
commit 6bcb886
Showing
8 changed files
with
47 additions
and
89 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
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