| Index: content/browser/frame_host/navigation_controller_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
| index 572f3c5f2fb27d56730361bf351a9d278a1e2fb8..1f07ec664e0b2f0f212e746e2fb5d89d9d80db42 100644
|
| --- a/content/browser/frame_host/navigation_controller_impl.cc
|
| +++ b/content/browser/frame_host/navigation_controller_impl.cc
|
| @@ -915,6 +915,7 @@
|
| // the caller that nothing has happened.
|
| if (pending_entry_) {
|
| DiscardNonCommittedEntries();
|
| + delegate_->NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
|
| }
|
| return false;
|
| default:
|
| @@ -1776,26 +1777,13 @@
|
| }
|
|
|
| void NavigationControllerImpl::DiscardNonCommittedEntries() {
|
| - bool discarding_visible_entry = GetVisibleEntry() != GetLastCommittedEntry();
|
| - bool had_transient_entry = GetTransientEntry() != nullptr;
|
| -
|
| - // Clearing the transient entry should always result in a change to the
|
| - // visible entry.
|
| - DCHECK(!had_transient_entry || discarding_visible_entry);
|
| -
|
| - // Actually discard pending entries.
|
| + bool transient = transient_entry_index_ != -1;
|
| DiscardNonCommittedEntriesInternal();
|
|
|
| - DCHECK_EQ(GetVisibleEntry(), GetLastCommittedEntry());
|
| - DCHECK(!GetTransientEntry());
|
| - DCHECK(!GetPendingEntry());
|
| -
|
| - if (discarding_visible_entry) {
|
| - // If we discarded a visible transient entry, invalidate all.
|
| - // Otherwise we've discarded a pending entry, and we only
|
| - // need to invalidate the URL.
|
| - delegate_->NotifyNavigationStateChanged(
|
| - had_transient_entry ? INVALIDATE_TYPE_ALL : INVALIDATE_TYPE_URL);
|
| + // If there was a transient entry, invalidate everything so the new active
|
| + // entry state is shown.
|
| + if (transient) {
|
| + delegate_->NotifyNavigationStateChanged(INVALIDATE_TYPE_ALL);
|
| }
|
| }
|
|
|
|
|