Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2518783002: [ios] Removed -[CRWSessionController goDelta:]. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/navigation/navigation_manager_impl_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b35cdc7dcc06a5253881840741c74a8d56f0bce7..41cf58dab9ebf0023d23ba2c1d343f8a6d99425e 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -2378,9 +2378,12 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
}
- (void)goDelta:(int)delta {
+ if (_isBeingDestroyed)
+ return;
+
if (delta == 0) {
[self reload];
- } else if ([self.sessionController canGoDelta:delta]) {
+ } else if (_webStateImpl->GetNavigationManager()->CanGoToOffset(delta)) {
[self goToItemAtIndex:[self.sessionController indexOfEntryForDelta:delta]];
}
}
« no previous file with comments | « ios/web/navigation/navigation_manager_impl_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698