Skip to content

Commit

Permalink
[iOS] Remove spurious DCHECK from BVC.
Browse files Browse the repository at this point in the history
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 <marq@chromium.org>
Reviewed-by: Federica Germinario <fedegermi@google.com>
Cr-Commit-Position: refs/heads/main@{#1210139}
  • Loading branch information
marcq authored and Chromium LUCI CQ committed Oct 16, 2023
1 parent 6e8022e commit ebf30b1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ios/chrome/browser/ui/browser_view/browser_view_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ebf30b1

Please sign in to comment.