New issue
Advanced search Search tips

Issue 880884 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Create one BackgroundFetchIconLoader per fetch

Project Member Reported by na...@chromium.org, Sep 5

Issue description

Currently BackgroundFetchManager has one instance of the loader, which will cause problems when we run multiple fetches in quick succession, since:
a. The loader is stateful, and
b. Many operations done by the loader are asynchronous and might interleave with similar operations from.

Update to having one loader per fetch to avoid this issue.
 
 Issue 875200  has been merged into this issue.
I would like take this issue if no one working on this. :)
Status: Started (was: Available)
Cool! Thank you! Please go for it and let us know if you need any help :)

(I can't assign the bug to you, but will update its status to Started.)
I think BackgroundFetchIconLoader move into fetch() and should be instanced as a local pointer. But, it can't be managed to interrupt when ContextDestroyed called because it is a local pointer.
(https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc?l=570)

There are many ways to manage BackgroundFetchIconLoader instanced such as HeapVector<>.
But, I'm not sure this way is good.
Could you give me some guides for managing multiple BackgroundFetchIconLoader in background_fetch_manager?
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 10

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

commit 740df9ada67ff550a3c6dd51aed4d29fe3aea31f
Author: Jaeyong Bae <jdragon.bae@gmail.com>
Date: Wed Oct 10 16:30:54 2018

Create one BackgroundFetchIconLoader per fetch

This patch means having one loader per fetch to avoid below issues.
a. The loader is stateful
b. Many operations done by the loader are asynchronous
and might interleave with similar operations from.

Bug:  880884 
Change-Id: I5d2d8c8ecaba58ed1bd3856814cc19f562228255
Reviewed-on: https://chromium-review.googlesource.com/c/1246541
Commit-Queue: Jaeyong Bae <jdragon.bae@gmail.com>
Reviewed-by: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598359}
[modify] https://crrev.com/740df9ada67ff550a3c6dd51aed4d29fe3aea31f/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
[modify] https://crrev.com/740df9ada67ff550a3c6dd51aed4d29fe3aea31f/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.h

Status: Fixed (was: Started)

Sign in to add a comment