Commit 78e40e1f authored by Jon Mann's avatar Jon Mann Committed by Commit Bot

Check that the newly installed PWA exists before dereferencing it.

Bug: 976384
Change-Id: Ibb18e97bd5e799a513922b81698eb5cea98b5bfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1665912
Commit-Queue: Jon Mann <jonmann@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670284}
parent c2234359
...@@ -159,11 +159,8 @@ void AndroidSmsAppManagerImpl::OnSetUpNewAppResult( ...@@ -159,11 +159,8 @@ void AndroidSmsAppManagerImpl::OnSetUpNewAppResult(
const extensions::Extension* new_pwa = setup_controller_->GetPwa( const extensions::Extension* new_pwa = setup_controller_->GetPwa(
GetAndroidMessagesURL(true /* use_install_url */)); GetAndroidMessagesURL(true /* use_install_url */));
// If the installation succeeded, a PWA should exist at the new URL. // If the app failed to install or the PWA does not exist, do not launch.
DCHECK_EQ(success, new_pwa != nullptr); if (!success || !new_pwa) {
// If the app failed to install, it should no longer be launched.
if (!success) {
is_app_launch_pending_ = false; is_app_launch_pending_ = false;
return; 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