New issue
Advanced search Search tips

Issue 737013 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

InstallableManager will not process tasks added after it starts waiting for a service worker

Project Member Reported by dominickn@chromium.org, Jun 27 2017

Issue description

1. Enable the experiment to check installability on load.

2. Visit a page with a manifest, icons, but no service worker on Android

3. Use the add to homescreen menu item. Notice that the icon is auto generated


This occurs because the onload installability check is waiting for a service worker, which currently blocks any other task from running.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 27 2017

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

commit ee088c9f11822f91a180217765a1f71261e24038
Author: dominickn <dominickn@chromium.org>
Date: Tue Jun 27 08:02:50 2017

Don't block InstallableManager::GetData calls when waiting for a service worker.

If the InstallableManager is processing a task that is waiting for the
site to register a service worker, all new tasks will block until the
first task is complete. If the site never registers a service worker,
all new calls to InstallableManager will never succeed, even if they are
not requesting a service worker check.

This is particularly important if installability checking on page load is
enabled. Trying to add a non-PWA with a manifest and icon to
homescreen will not use the manifest icon or details since the onload
check is hanging waiting for a service worker.

This CL addresses the bug by introducing a paused task queue to hold
waiting tasks. Existing tests are amended to explicitly check the paused
case.

BUG= 737013 

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

[modify] https://crrev.com/ee088c9f11822f91a180217765a1f71261e24038/chrome/browser/installable/installable_manager.cc
[modify] https://crrev.com/ee088c9f11822f91a180217765a1f71261e24038/chrome/browser/installable/installable_manager.h
[modify] https://crrev.com/ee088c9f11822f91a180217765a1f71261e24038/chrome/browser/installable/installable_manager_browsertest.cc

Status: Fixed (was: Started)

Sign in to add a comment