From ebf30b173cf3a8b7f5e4207fdd52ff1609ed1e17 Mon Sep 17 00:00:00 2001 From: Mark Cogan Date: Mon, 16 Oct 2023 12:37:33 +0000 Subject: [PATCH] [iOS] Remove spurious DCHECK from BVC. The DCHECK in the BVC's openNewTabFromOriginPoint: method doesn't guard against anything, and is documented as being possible to hit in ordinary usage, so it doesn't seem to be a correctness assertion. As far as I can tell the conditional around the screenshot after the DCHECK will catch any other issues that could arise in this method. Fixed: 1488872 Change-Id: I040bc7f4e0bb8f2746fc059787e139f3c709e635 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4941970 Commit-Queue: Mark Cogan Reviewed-by: Federica Germinario Cr-Commit-Position: refs/heads/main@{#1210139} --- .../browser/ui/browser_view/browser_view_controller.mm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm index b7dd5c25ab765a..2bf75945073341 100644 --- a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm +++ b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm @@ -639,11 +639,6 @@ - (void)openNewTabFromOriginPoint:(CGPoint)originPoint }; [self setLastTapPointFromCommand:originPoint]; - // The new tab can be opened before BVC has been made visible onscreen. Test - // for this case by checking if the parent container VC is currently in the - // process of being presented. - DCHECK(self.visible || self.dismissingModal || - self.parentViewController.isBeingPresented); // In most cases, we want to take a snapshot of the current tab before opening // a new tab. However, if the current tab is not fully visible (did not finish