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

Unified Diff: ios/web/navigation/navigation_manager_impl.mm

Issue 2780703002: Reload with empty navigation manager should not crash (Closed)
Patch Set: Change include navigation_manager.h to import Created 3 years, 9 months 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 | « no previous file | ios/web/web_state/web_state_unittest.mm » ('j') | ios/web/web_state/web_state_unittest.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/navigation_manager_impl.mm
diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm
index a059c1d0e3c19f4421442ccc06de66ddcc44dd38..a87b7b08ab0dc9f62d192773682d73d4bd1bef9f 100644
--- a/ios/web/navigation/navigation_manager_impl.mm
+++ b/ios/web/navigation/navigation_manager_impl.mm
@@ -339,6 +339,9 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
void NavigationManagerImpl::Reload(ReloadType reload_type,
bool check_for_reposts) {
+ if (!GetTransientItem() && !GetPendingItem() && !GetLastCommittedItem())
+ return;
+
delegate_->Reload();
}
« no previous file with comments | « no previous file | ios/web/web_state/web_state_unittest.mm » ('j') | ios/web/web_state/web_state_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698