Commit 7072664e authored by edchin's avatar edchin Committed by Commit Bot

[ios] Fix history coordinator |-stopWithCompletion:|

The completion handler was not properly being run in history coordinator
when the coordinator was previously stopped.

Bug: 854597
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I3a317f8776ea10452889c39a69cb257d4a8e7073
Reviewed-on: https://chromium-review.googlesource.com/1111619Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569692}
parent 925fc7c5
......@@ -98,11 +98,16 @@
[self stopWithCompletion:nil];
}
// This method should always execute the |completionHandler|.
- (void)stopWithCompletion:(ProceduralBlock)completionHandler {
if (self.historyNavigationController) {
[self.historyNavigationController
dismissViewControllerAnimated:YES
completion:completionHandler];
self.historyNavigationController = nil;
} else if (completionHandler) {
completionHandler();
}
}
#pragma mark - HistoryLocalCommands
......
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