| Index: ios/web/web_state/ui/crw_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
|
| index c695bf76f977afd25079aba11cdf90c0ca095d15..19a95a60e53e49fa95a2123711e9f9f759feb4a8 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -2164,14 +2164,6 @@ - (void)goToItemAtIndex:(int)index {
|
| [self webWillFinishHistoryNavigationFromEntry:fromEntry];
|
| [self updateHTML5HistoryState];
|
| } else {
|
| - // TODO(crbug.com/691492): After discardNonCommittedItems, the item
|
| - // pointed by |fromEntry| may not be valid anymore.
|
| - // Set |fromEntry| to nil to avoid crash whan using the item.
|
| - // Remove when the fix is not needed anymore.
|
| - if ([fromEntry isEqual:sessionController.transientEntry] ||
|
| - [fromEntry isEqual:sessionController.pendingEntry]) {
|
| - fromEntry = nil;
|
| - }
|
| [sessionController discardNonCommittedItems];
|
| [sessionController setPendingItemIndex:index];
|
|
|
| @@ -2409,10 +2401,7 @@ - (CRWPassKitDownloader*)passKitDownloader {
|
| }
|
|
|
| - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry {
|
| - // TODO(crbug.com/691492): Removing the DCHECK as |fromEntry| may be nil if
|
| - // the pending entry was discarded.
|
| - // Remove when the fix is not needed anymore.
|
| - // DCHECK(fromEntry);
|
| + DCHECK(fromEntry);
|
| [self updateDesktopUserAgentForEntry:self.currentSessionEntry
|
| fromEntry:fromEntry];
|
| [_delegate webWillFinishHistoryNavigationFromEntry:fromEntry];
|
|
|