New issue
Advanced search Search tips

Issue 647873 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Crash when adding to the homescreen and AddToHomescreenDataFetcher's web manifest fetch times out

Project Member Reported by pkotw...@chromium.org, Sep 16 2016

Issue description

Crash when adding to the homescreen and AddToHomescreenDataFetcher's web manifest fetch times out when WebAPKs are installed

The crash is caused because:
- AddToHomescreenManager::OnDidDetermineWebApkCompatibility() is never called when the fetch times out.
  As result, the dialog is never shown.
- AddToHomescreenManager::OnDataAvailable() is still called.
- AddToHomescreenManager#mObserver being null when OnDataAvailable() is called because the dialog is
  not shown.
 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67a9c9db813e7b963f0696dbad0b7c8da70c67be

commit 67a9c9db813e7b963f0696dbad0b7c8da70c67be
Author: pkotwicz <pkotwicz@chromium.org>
Date: Tue Sep 20 17:02:53 2016

Call AddToHomescreenDataFetcher::Observer callbacks when manifest fetch times out

This CL ensures that all of the AddToHomescreenDataFetcher::Observer callbacks
still get called when the manifest fetch times out. Previously
Observer::OnDidDetermineWebApkCompatibility() and
Observer::OnDataAvailable() were not called.

Observer::OnDidDetermineWebApkCompatibility() shows the dialog when WebAPKs are
enabled and the manifest fetch times out.
Observer::OnUserTitleAvailable() enables the text field in the add-to-homescreen
dialog.
Observer::OnDataAvailable() enables the add button in the add-to-homescreen
dialog.

BUG= 647873 
TEST=AddToHomescreenManagerTest#testAddWebappShortcutManifestFetchTimesOut

Review-Url: https://codereview.chromium.org/2342183002
Cr-Commit-Position: refs/heads/master@{#419796}

[modify] https://crrev.com/67a9c9db813e7b963f0696dbad0b7c8da70c67be/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/AddToHomescreenManagerTest.java
[modify] https://crrev.com/67a9c9db813e7b963f0696dbad0b7c8da70c67be/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc
[modify] https://crrev.com/67a9c9db813e7b963f0696dbad0b7c8da70c67be/chrome/browser/android/webapps/add_to_homescreen_data_fetcher.h
[add] https://crrev.com/67a9c9db813e7b963f0696dbad0b7c8da70c67be/chrome/test/data/banners/manifest_times_out_test_page.html

Status: Fixed (was: Assigned)
This change is not worth testing manually. It requires a slow site 

Sign in to add a comment