Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Issue 2392313003: Fix a DCHECK failure in AppBannerManager when adding to homescreen from devtools. (Closed)

Created:
4 years, 2 months ago by dominickn
Modified:
4 years, 2 months ago
Reviewers:
gone
CC:
chromium-reviews, dominickn+watch_chromium.org, pkotwicz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a DCHECK failure in AppBannerManager when adding to homescreen from devtools. If the desktop browser is opened to a banner-eligible PWA, and then "Add to homescreen" is run from the Devtools "Application" tab, a DCHECK failure in HostContentSettingsMap is triggered. The cause of this is a null validated_url; this variable is usually set in AppBannerManager::DidFinishLoad, but this will not run since banners are disabled by default on desktop and triggering add to homescreen manually creates the AppBannerManager after DidFinishLoad is run. This CL fixes the issue by manually setting the validated_url when the banner pipeline begins if it is null. This bug should only manifest itself in this exact instance; enabling banners via chrome://flags#enable-add-to-shelf ensures that the AppBannerManager is created. BUG=None TEST=Disable "Add to shelf" in chrome://flags in a desktop Chrome instance. Navigate to a banner-eligible site, open Devtools, and trigger "Add to homescreen" from the "Application" tab. No crash should happen and the add to shelf banner should be seen. Committed: https://crrev.com/25c5044ae450e344a0cb828507618139dcc009d3 Cr-Commit-Position: refs/heads/master@{#423665}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M chrome/browser/banners/app_banner_manager.cc View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (7 generated)
dominickn
PTAL, thanks!
4 years, 2 months ago (2016-10-06 03:49:59 UTC) #4
gone
lgtm
4 years, 2 months ago (2016-10-06 17:16:40 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2392313003/1
4 years, 2 months ago (2016-10-06 20:38:48 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-06 20:50:13 UTC) #10
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 20:51:35 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/25c5044ae450e344a0cb828507618139dcc009d3
Cr-Commit-Position: refs/heads/master@{#423665}

Powered by Google App Engine
This is Rietveld 408576698