Commit c5676d23 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

Test possible fix to DiscardNonCommittedEntries for crash

For https://bugs.chromium.org/p/chromium/issues/detail?id=1007570, I
can't reproduce the issue, but my best guess is that somehow we're
relying on DiscardPendingEntry getting called when we don't have a
pending entry to clear the failed_pending_entry_id_. This makes sure
that we don't skip calls to DiscardPendingEntry when we've set a
failed_pending_entry_id_.

Bug: 1007570
Change-Id: I3e1f46515247b99a0adbd68b3fea82aa719e474a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825592
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699987}
parent 97f57206
......@@ -3361,8 +3361,13 @@ void NavigationControllerImpl::FinishRestore(int selected_index,
void NavigationControllerImpl::DiscardNonCommittedEntries() {
// Avoid sending a notification if there is nothing to discard.
if (!pending_entry_ && transient_entry_index_ == -1)
// TODO(mthiesse): Temporarily checking failed_pending_entry_id_ to help
// diagnose https://bugs.chromium.org/p/chromium/issues/detail?id=1007570.
if (!pending_entry_ && transient_entry_index_ == -1 &&
failed_pending_entry_id_ == 0) {
return;
}
DiscardPendingEntry(false);
DiscardTransientEntry();
if (delegate_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment