WebLayer: fix crash in weblayer shell
When the favicon is updated but the top contents container is not set as
the top view, finding the favicon view would fail.
test:
1. click top left dropdown menu
2. select alternate top view
3. navigate
Bug: 1145310
Change-Id: I7aadc6a8b43b18e318d2ffea89aea0688a27e636
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519090
Auto-Submit: Evan Stade <estade@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824016}
This commit is contained in:
@ -769,7 +769,7 @@ public class WebLayerShellActivity extends AppCompatActivity {
|
||||
private void updateFavicon(@NonNull Tab tab) {
|
||||
if (tab == mBrowser.getActiveTab()) {
|
||||
assert mTabToPerTabState.containsKey(tab);
|
||||
((ImageView) findViewById(R.id.favicon_image_view))
|
||||
((ImageView) mTopContentsContainer.findViewById(R.id.favicon_image_view))
|
||||
.setImageBitmap(mTabToPerTabState.get(tab)
|
||||
.mFaviconFetcher.getFaviconForCurrentNavigation());
|
||||
}
|
||||
|
Reference in New Issue
Block a user