Commit d9b5ddf0 authored by Xi Han's avatar Xi Han Committed by Chromium LUCI CQ

[Start] Remove an unnecessary null check of TabModelSelector.

The crash is caused by LayoutManagerChrome#showOverview() is called
before the LayoutManagerChrome is initialized. More specifically, the
TabModelSelector hasn't been set to the LayoutManagerChrome. However,
the null check doesn't seem necessary when
LayoutManagerImpl#startShowing() is called. Thus we remove this check
to avoid crash on the debug build.

Bug: 1164884
Change-Id: If5dc74ce39bed62f6ac0fa07a7578fda18ba6bb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622326Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843029}
parent cc62b0c1
...@@ -955,7 +955,6 @@ public class LayoutManagerImpl implements LayoutManager, LayoutUpdateHost, Layou ...@@ -955,7 +955,6 @@ public class LayoutManagerImpl implements LayoutManager, LayoutUpdateHost, Layou
* @param animate Whether or not {@code layout} should animate as it shows. * @param animate Whether or not {@code layout} should animate as it shows.
*/ */
protected void startShowing(Layout layout, boolean animate) { protected void startShowing(Layout layout, boolean animate) {
assert mTabModelSelector != null : "init() must be called first.";
assert layout != null : "Can't show a null layout."; assert layout != null : "Can't show a null layout.";
// Set the new layout // Set the new layout
......
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