Open Bug 1426487 Opened 8 years ago Updated 1 year ago

Add method for adding download listeners without pausing and restarting the download

Categories

(Toolkit :: Application Update, defect, P2)

defect

Tracking

()

Tracking Status
firefox58 - ---

People

(Reporter: robert.strong.bugs, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Currently it is necessary to stop the update download (e.g. pauseDownload) and restart it again with downloadUpdate to remove the background download listener and add the foreground download listener. This shouldn't be necessary and causes bugs like bug 1423571.
Attached patch patch in progress (obsolete) — Splinter Review
I don't think new methods will be needed. Pushed to oak so I can manually test things.
Robert, do we still need this for 58 as well as 59?
Flags: needinfo?(robert.strong.bugs)
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #2) > Robert, do we still need this for 58 as well as 59? No, bug 1423967 was identified as the bug that regressed / caused bug 1423571 and bug 1423967 was backed out of beta and aurora (dev edition) which is 58.
Flags: needinfo?(robert.strong.bugs)
Correction, Bug 1348087 was the actual cause which is stated as being backed out in bug 1423967
Yes, I saw that, but it looks like testing failed in https://bugzilla.mozilla.org/show_bug.cgi?id=1423571#c20
Flags: needinfo?(robert.strong.bugs)
I suspect that was cause by the backout not being included in the build that was tested that failed. Could you check if that is the case?
Flags: needinfo?(robert.strong.bugs) → needinfo?(lhenry)
Sure, I asked QA to confirm which version they were testing or to re-verify with a later build.
Flags: needinfo?(lhenry)
Gerry, can you follow up here to make sure all is well for 58 ? Thanks.
Flags: needinfo?(gchang)
According to comment #26 in bug 1423571. This should not be an issue in 58. It's no longer a blocking. Mark 58 won't fix.
Flags: needinfo?(gchang)
Attached patch patch rev1Splinter Review
I pushed this patch to oak. I've seen some problems with the TV test runs but think I have them fixed (fingers crossed).
Attachment #8938208 - Attachment is obsolete: true
Attachment #8941666 - Flags: review?(mhowell)
The TV test runs are passing.
I've also manually tested repeatedly opening the about window and restarting Firefox while the download is in progress.
Comment on attachment 8941666 [details] [diff] [review] patch rev1 Review of attachment 8941666 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/mozapps/update/nsUpdateService.js @@ +3595,5 @@ > + if (requestEntityID && requestEntityID != patchEntityID) { > + this._patch.QueryInterface(Ci.nsIWritablePropertyBag); > + this._patch.setProperty("entityID", requestEntityID); > + Cc["@mozilla.org/updates/update-manager;1"]. > + getService(Ci.nsIUpdateManager).saveUpdates(); If the entityID has changed (and was previously set), then we should abort the request and start over without trying to resume, because that means that either the last modified time or the file size has changed since the last download attempt, so we're now downloading a different file than we were before. The channel handled this for us by failing the request with NS_ERROR_ENTITY_CHANGED if the new entityID doesn't match the one passed to resumeAt, but since this patch no longer passes that parameter we should take care of it here. @@ +3631,5 @@ > > let currentTime = Date.now(); > if ((currentTime - this._lastProgressTimeMs) > DOWNLOAD_PROGRESS_INTERVAL) { > + LOG("ChannelDownloader:onProgress - progress: " + progress + > + "/" + maxProgress); This change is actually addressing bug 1417254, which is fine since it's so small, just need to remember to also close that one out.
Attachment #8941666 - Flags: review?(mhowell) → review-
Robert, Matt, since this update issue affects 59, do you think we should hold back 59.0b1? It is built and tested and was scheduled to be released today. We could try to land a fix, test it, and go to build for 59.0b2 by tomorrow or Thursday.
Flags: needinfo?(robert.strong.bugs)
Flags: needinfo?(mhowell)
I think it would be safer to backout the changes on beta as was done in bug 1423967.
Flags: needinfo?(robert.strong.bugs)
One backout bug and patch coming right up.
Flags: needinfo?(mhowell)
Priority: -- → P1
Blocks: 1420210
Robert, is this still expected to make 60? If not should we at some point back bug 1348087 out of central until we get this sorted?
Flags: needinfo?(robert.strong.bugs)
The backout happened on nightly in bug 1442407 and it was uplifted to beta so no need to block.
Flags: needinfo?(robert.strong.bugs)
Blocks: 1348087
Assignee: robert.strong.bugs → nobody
Status: ASSIGNED → NEW
Priority: P1 → P2
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: