Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[M115] Fix an underflow when ModelReadyToSync is called
This CL fixes an underflow that is happening when ReadingListSyncBridge::ModelReadyToSync() is called from ReadingListModelImpl::StoreLoaded() by suppressing the observer notification when ReadingListSyncBridge::ModelReadyToSync() called. When ReadingListSyncBridge::ModelReadyToSync() is called from ReadingListModelImpl::StoreLoaded(), it's called before ReadingListModelLoaded() is called, and it could reach to ReadingListModelImpl::DeleteAllEntries() which means notifying deletions to DualReadingListModel, which decrement the DualReadingListModel::unread_entry_count_ and DualReadingListModel::read_entry_count_ before they are initialized, which causes the underflow. (cherry picked from commit 4c6016c) Fixed: 1446140 Change-Id: I6968bba233a505ae4bbc9a568fc5e074945a0603 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4552758 Reviewed-by: Mikel Astiz <mastiz@chromium.org> Commit-Queue: Mahmoud Rashad <mmrashad@google.com> Cr-Original-Commit-Position: refs/heads/main@{#1148616} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568075 Cr-Commit-Position: refs/branch-heads/5790@{#120} Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
- Loading branch information
Mahmoud Rashad
authored and
Chromium LUCI CQ
committed
May 30, 2023
1 parent
8a69f6f
commit 988be40
Showing
3 changed files
with
58 additions
and
12 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