Skip to content

Commit

Permalink
iwa: Check for null WebAppProvider in ChromeBrowsingDataModelDelegate
Browse files Browse the repository at this point in the history
This is a speculative fix based on the stack trace in the crash
report. WebAppProvider can be null on ChromeOS in certain cases, which
will be changed/fixed soon, but this will handle the null case in
the meantime.

Bug: 1427992, 1311065
Change-Id: If5dfca0194764f2e1f738a9c424c0b8bee624ff4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4383196
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1123907}
  • Loading branch information
robbiemc authored and Chromium LUCI CQ committed Mar 29, 2023
1 parent 629cd9a commit 4ba71ed
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ ChromeBrowsingDataModelDelegate::~ChromeBrowsingDataModelDelegate() = default;
void ChromeBrowsingDataModelDelegate::GetAllDataKeys(
base::OnceCallback<void(std::vector<DelegateEntry>)> callback) {
#if !BUILDFLAG(IS_ANDROID)
if (storage_partition_->GetConfig().is_default()) {
auto* web_app_provider = web_app::WebAppProvider::GetForWebApps(profile_);
DCHECK(web_app_provider);
auto* web_app_provider = web_app::WebAppProvider::GetForWebApps(profile_);
if (web_app_provider && storage_partition_->GetConfig().is_default()) {
web_app_provider->scheduler().GetIsolatedWebAppBrowsingData(
base::BindOnce(&IsolatedWebAppBrowsingDataToDelegateEntries)
.Then(std::move(callback)));
Expand Down

0 comments on commit 4ba71ed

Please sign in to comment.