Index: ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
diff --git a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
index 528b23ab18dc32ffb78447b53a0c391428192bc7..b306ba342f959c525ad96cc90242c99223c9c634 100644 |
--- a/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
+++ b/ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm |
@@ -849,7 +849,7 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { |
- (void)dismissTabHistoryPopup { |
if (!_tabHistoryPopupController) |
return; |
- TabHistoryPopupController* tempTHPC = _tabHistoryPopupController; |
+ __block TabHistoryPopupController* tempTHPC = _tabHistoryPopupController; |
[tempTHPC containerView].userInteractionEnabled = NO; |
[tempTHPC dismissAnimatedWithCompletion:^{ |
// Unpress the back/forward button by restoring the normal and |
@@ -857,7 +857,7 @@ CGRect RectShiftedDownAndResizedForStatusBar(CGRect rect) { |
[self setImagesForNavButton:_backButton withTabHistoryVisible:NO]; |
[self setImagesForNavButton:_forwardButton withTabHistoryVisible:NO]; |
// Reference tempTHPC so the block retains it. |
- [tempTHPC self]; |
+ tempTHPC = nil; |
}]; |
// reset _tabHistoryPopupController to prevent -applicationDidEnterBackground |
// from posting another kTabHistoryPopupWillHideNotification. |