Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up HashTable::[Full]LookupForWriting()
- The original LookupForWriting() was merely for Reinsert() during Rehash(), so the IsDeletedBucket() and Equal() conditions should never met and it can be greatly simplified. Now fold the function into Reinsert(). - The original FullLookupForWriting() is renamed to LookupForWriting(), and now handles can_reuse_deleted_value. - Fix a bug in insert() about can_reuse_deleted_value. Previously in theory Equal() could be called with a deleted value when both kSafeToCompareToEmptyOrDeleted and can_reuse_deleted_entry were false (though doesn't seem to exist in real world). Bug: 1374475 Change-Id: I529eaeb99b005e4c93b45b8fa3917ce6188e96cd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4190767 Reviewed-by: Kentaro Hara <haraken@chromium.org> Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#1096826}
- Loading branch information
1 parent
4f30bfc
commit 3454d77
Showing
1 changed file
with
54 additions
and
94 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