Commit 5ba5871f authored by David Maunder's avatar David Maunder Committed by Commit Bot

Acquire tab.getTitle() on UI Thread

We now enforce that Tab attributes are acquired on the UI thread

Bug: 1117396
Change-Id: Ia7d41be25ae3dc201e8ad7a7f96255b7ca09f60d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390869Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
Commit-Queue: David Maunder <davidjm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804077}
parent dcf224f6
......@@ -203,10 +203,11 @@ public class CustomTabObserver extends EmptyTabObserver {
if (mCustomTabsConnection == null) return;
if (!mCustomTabsConnection.shouldSendNavigationInfoForSession(mSession)) return;
if (tab.getWebContents() == null) return;
if (TextUtils.isEmpty(tab.getTitle())) return;
ShareImageFileUtils.captureScreenshotForContents(tab.getWebContents(), mContentBitmapWidth,
mContentBitmapHeight, (Uri snapshotPath) -> {
if (TextUtils.isEmpty(tab.getTitle()) && snapshotPath == null) return;
if (snapshotPath == null) return;
mCustomTabsConnection.sendNavigationInfo(
mSession, tab.getUrlString(), tab.getTitle(), snapshotPath);
});
......
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