extra chrome.downloads.onChanged events generated during cancel

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Request Handling
P5
normal
a year ago
8 months ago

People

(Reporter: aswan, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [downloads]triaged)

(Reporter)

Description

a year ago
When a download is canceled, it goes through a state that looks very much like a paused download (ie, the transfer has been canceled but we haven't yet removed the partial data ffrom disk).

As a result, we generate multiple onChanged events, one in which paused and canResume go from false to true, then a second in which those fields go back from true to false and error goes to USER_CANCELED.

Note that there are multiple ways a download can be canceled, and we'll want to make sure we catch all of them, including Download.finalize() [1] as well as via the UI [2]

[1] https://dxr.mozilla.org/mozilla-central/rev/f0c0480732d36153e8839c7f17394d45f679f87d/toolkit/components/jsdownloads/src/DownloadCore.jsm#1003
[2] https://dxr.mozilla.org/mozilla-central/rev/f0c0480732d36153e8839c7f17394d45f679f87d/browser/components/downloads/DownloadsViewUI.jsm#290

(see also discussion in bug 1245602)

Updated

a year ago
Whiteboard: [downloads] → [downloads]triaged

Updated

8 months ago
Component: WebExtensions: Untriaged → WebExtensions: Request Handling
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.