Commit f3263b9a authored by Mei Liang's avatar Mei Liang Committed by Commit Bot

Fix NullPointerException at chromeTabbedActivity#ShowOverview

crrev.com/c/2314557 removes the OverviewModeController wrapper in
ChromeTabbedActivity, and |mOverviewModeController| is null before
native loads which leads to a NullPointerException. This CL fixes the
crash by restoring the effective null checking in the
OverviewModeController wrapper.

Bug: 1112229
Change-Id: Ia62d9acdd267ed8c602fe61d85c2ecea8ac26747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2337340Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Mei Liang <meiliang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796250}
parent c60ca25c
......@@ -2015,7 +2015,7 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|| state == OverviewModeState.SHOWING_START);
if (mStartSurface != null) mStartSurface.getController().setOverviewState(state);
if (mOverviewModeController.overviewVisible()) return;
if (mOverviewModeController == null || mOverviewModeController.overviewVisible()) return;
Tab currentTab = getActivityTab();
// If we don't have a current tab, show the overview mode.
......@@ -2048,7 +2048,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
getTabModelSelector().selectModel(incognito);
if (TabUiFeatureUtilities.supportInstantStart(isTablet())
|| getTabModelSelector().isTabStateInitialized()) {
|| (getTabModelSelector().isTabStateInitialized()
&& isLayoutManagerCreated())) {
showOverview(OverviewModeState.SHOWING_HOMEPAGE);
}
return true;
......
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