| Index: ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm
|
| diff --git a/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm b/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm
|
| index 12efac918d89aa627d0a08970225bb3da93b2554..d9dd290b93a52b445b512f11a0aef308d4f84be3 100644
|
| --- a/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm
|
| +++ b/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm
|
| @@ -442,7 +442,7 @@ - (void)stopUpdatingLocation {
|
| }
|
|
|
| - (void)addLocationAndReloadTab:(Tab*)tab {
|
| - if (self.enabled && [tab navigationManager]) {
|
| + if (self.enabled && tab.webState) {
|
| // Make sure that GeolocationUpdater is running the first time we request
|
| // the current location.
|
| //
|
| @@ -453,10 +453,12 @@ - (void)addLocationAndReloadTab:(Tab*)tab {
|
| // GeolocationUpdater.
|
| [self startUpdatingLocation];
|
|
|
| - web::NavigationItem* item =
|
| - tab.webState->GetNavigationManager()->GetVisibleItem();
|
| + web::NavigationManager* navigationManager =
|
| + tab.webState->GetNavigationManager();
|
| + web::NavigationItem* item = navigationManager->GetVisibleItem();
|
| if ([self addLocationToNavigationItem:item browserState:tab.browserState]) {
|
| - [tab reload];
|
| + navigationManager->Reload(web::ReloadType::NORMAL,
|
| + true /* check_for_repost */);
|
| }
|
| }
|
| }
|
|
|