Closed Bug 1095506 Opened 5 years ago Closed 5 years ago

Properly serialize errors to the store

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
Points:
3

Tracking

()

VERIFIED FIXED
mozilla36
Iteration:
36.3

People

(Reporter: smacleod, Assigned: smacleod)

References

Details

Attachments

(2 files, 1 obsolete file)

In order to support downloads with errors that should be persisted between restarts we need to properly serialize the error, and restore it when loading from the store.
Flags: firefox-backlog+
Flags: qe-verify?
Attachment #8520347 - Flags: review?(paolo.mozmail)
/r/387 - Bug 1095506 - Serialize the error object when saving to the store. r=paolo
/r/389 - Bug 1095506 - Clean up and rename kSerializableDownloadProperties. r=paolo

Pull down these commits:

hg pull review -r 5a5a06cf783fe452f646666f32c32eecb512a6e2
Iteration: 36.2 → 36.3
https://reviewboard.mozilla.org/r/385/#review177

Looks good, thanks a lot!

::: toolkit/components/jsdownloads/src/DownloadCore.jsm
(Diff revision 1)
> +            ex = DownloadError(properties);

new DownloadError

::: toolkit/components/jsdownloads/src/DownloadCore.jsm
(Diff revision 1)
> +   * contain the original exception. This will not serialized when saving

typo: will not be
Attachment #8520347 - Flags: review?(paolo.mozmail) → review+
Hi Steven, can you mark this bug for QE verification.
Flags: needinfo?(smacleod)
Should be able to verify this by checking the profiles Downloads.json file for the error key, and observing it is an object with more than just a "message" key.

This will require causing a failed download with partial data.
Flags: qe-verify?
Flags: qe-verify+
Flags: needinfo?(smacleod)
Attachment #8520347 - Flags: review+ → review?(paolo.mozmail)
/r/387 - Bug 1095506 - Serialize the error object when saving to the store. r=paolo
/r/389 - Bug 1095506 - Clean up and rename kSerializableDownloadProperties. r=paolo

Pull down these commits:

hg pull review -r 5062b40701f4ebcdadef6a60197e422de51ab119
Updated commits should fix the test failures.

Try push: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=8da6485b37f6
Attachment #8520347 - Flags: review?(paolo.mozmail) → review+
https://hg.mozilla.org/mozilla-central/rev/3a1256f12738
https://hg.mozilla.org/mozilla-central/rev/8ff0a6cb3104
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
QA Contact: catalin.varga
Verified as fixed using the following environment:
FF 36
Build Id: 20141124030207
OS: Win 7 x64, Ubuntu 14.04 x64
Status: RESOLVED → VERIFIED
Attachment #8520347 - Attachment is obsolete: true
Attachment #8618570 - Flags: review+
Attachment #8618571 - Flags: review+
You need to log in before you can comment on or make changes to this bug.