[Instant start] Fix a crash with GTS enable_launch_polish
crrev.com/c/2402302 assumes TabModelSelector is always initialized which is no longer true with Instant start enabled. This CL fixes the wrong assumption by checking the TabModelSelector initialization state before accessing the TabModelSelector. Because of Instant start, we should always use the cached flag/value. We need to get the thumbnail aspect ratio from the TabUiFeatureUtilities#THUMBNAIL_ASPECT_RATIO instead of ChromeFeatureList#getFieldTrialParamByFeatureAsDouble which requires native initialization. We update all the usages to use the cached value in crrev.com/c/2427149. This CL is verified to be behind the gating function TabUiFeatureUtilities#isLaunchPolishEnabled by formal equivalence checking tool here: http://crrev.com/c/1934235. Change-Id: Ib4e72d9535328034a3914adec44ea744826d92cb Bug: 1131441 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427345 Commit-Queue: Mei Liang <meiliang@chromium.org> Reviewed-by:Xi Han <hanxi@chromium.org> Reviewed-by:
Wei-Yin Chen (陳威尹) <wychen@chromium.org> Cr-Commit-Position: refs/heads/master@{#810379}
Showing
Please register or sign in to comment