Commit ce6595d4 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Call stop on primary toolbar coordinator.

|locationBarCoordinator| needs to disconnect itself from webStateList.
Without this, closing the last incognito tab will DCHECK.

Also adds stop/disconnect/nil to adaptive toolbar coordinator.

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ia631150a73cdb2975fc0592ec5840692bf906d02
Reviewed-on: https://chromium-review.googlesource.com/973686
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545042}
parent c55a0e3a
......@@ -71,6 +71,13 @@
toolbarButton:self.viewController.toolsMenuButton];
}
- (void)stop {
[super stop];
self.toolsMenuButtonObserverBridge = nil;
[self.mediator disconnect];
self.mediator = nil;
}
#pragma mark - SideSwipeToolbarSnapshotProviding
- (UIImage*)toolbarSideSwipeSnapshotForWebState:(web::WebState*)webState {
......
......@@ -78,6 +78,11 @@
->AddObserver(_fullscreenObserver.get());
}
- (void)stop {
[super stop];
[self.locationBarCoordinator stop];
}
#pragma mark - PrimaryToolbarCoordinator
- (id<VoiceSearchControllerDelegate>)voiceSearchDelegate {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment