Commit 74a190eb authored by Nazerke's avatar Nazerke Committed by Chromium LUCI CQ

[ios] Add constraints to the tabstrip when it's needed.

The crash report shows that the crash of |addConstraintsToTabStrip| is
on the iphones only.

This CL removes the adding the constraints to the tabstrip from the
viewDidLoad, as currently it's crashing on it  while it's trying to add
the constraints to the tabstripview which is nil on the iphones.

Now it is moved to the point when the tabstripview is added, which does
not let it run on the iphones as it's not needed and causes crashes.

Bug: 1152059,  1128249
Change-Id: Ic161b0d687b828ec57889c455d171c4f6a5fcf42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611977Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Nazerke Kalidolda <nazerke@google.com>
Cr-Commit-Position: refs/heads/master@{#841411}
parent 9a543dd8
......@@ -1439,7 +1439,6 @@ NSString* const kBrowserViewControllerSnackbarCategory =
[self installFakeStatusBar];
[self buildToolbarAndTabStrip];
[self setUpViewLayout:YES];
[self addConstraintsToTabStrip];
[self addConstraintsToToolbar];
// If the tab model and browser state are valid, finish initialization.
......@@ -2282,6 +2281,7 @@ NSString* const kBrowserViewControllerSnackbarCategory =
[self addChildViewController:self.tabStripCoordinator.viewController];
self.tabStripView = self.tabStripCoordinator.view;
[self.view addSubview:self.tabStripView];
[self addConstraintsToTabStrip];
}
[self.view insertSubview:primaryToolbarView
aboveSubview:self.tabStripView];
......
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