Commit 1893b6c0 authored by David Maunder's avatar David Maunder Committed by Commit Bot

Don't acquire title on uninitialized Tab in TabPrinter

We no longer allow tab attributes to be acquired after
tab#destroy(). This has unveiled a number of places in the codebase
where invalid assumptions have been made. This patch fixes
one of them in TabPrinter.

Bug: 1117396
Change-Id: I7657824663b28eeaaf3f98a40d243a9d7bd6d167
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2409675Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: David Maunder <davidjm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807031}
parent da167106
......@@ -55,7 +55,7 @@ public class TabPrinter implements Printable {
@Override
public String getTitle() {
Tab tab = mTab.get();
if (tab == null) return mDefaultTitle;
if (tab == null || !tab.isInitialized()) return mDefaultTitle;
String title = tab.getTitle();
if (!TextUtils.isEmpty(title)) return title;
......
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