Commit 8d307f66 authored by David Maunder's avatar David Maunder Committed by Commit Bot

Bail out of maybeShareOfflinePage on uninitialized Tab

We now enforce that Tab attributes cannot be acquired
on an uninitialized Tab. If we don't bail out here
we will attempt to pull the title or url off an uninitialized
Tab leading to a crash.

Bug: 1133038
Change-Id: Idd39105dc47ac208b5e9e33144996f3643fec25c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2436326Reviewed-by: default avatarPeter Williamson <petewil@chromium.org>
Commit-Queue: David Maunder <davidjm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811810}
parent dd957482
......@@ -394,7 +394,7 @@ public class OfflinePageUtils {
* afterwards via PostTask.
*/
public static void maybeShareOfflinePage(Tab tab, final Callback<ShareParams> shareCallback) {
if (tab == null) {
if (tab == null || !tab.isInitialized()) {
shareCallback.onResult(null);
return;
}
......
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