[Download API] Accessing error attribute at download start fires NS_ERROR_UNEXPECTED

RESOLVED FIXED in 1.3 C1/1.4 S1(20dec)

Status

Firefox OS
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jsmith, Assigned: aus)

Tracking

(Blocks: 1 bug)

unspecified
1.3 C1/1.4 S1(20dec)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

4 years ago
Run the mochitest in bug 945099 with the error attribute test enabled. You'll see an intermittent failure where accessing the error attribute on the download object will throw an uncaught exception of NS_ERROR_UNEXPECTED. Fabrice mentions in bug 945099 that this is probably due to a failure to initialize this object when creating the download object.
(Reporter)

Updated

4 years ago
Blocks: 945099, 926955
Hi Aus,
This is happening everytime we are getting a download from the API. Could you take a look? We would need to fix this type of issues asap due to this will be shipped in 1.3. Thanks!
Flags: needinfo?(aus)
Summary: [Download API] Accessing error attribute at download start sometimes fires NS_ERROR_UNEXPECTED in emulator → [Download API] Accessing error attribute at download start fires NS_ERROR_UNEXPECTED
(Assignee)

Comment 2

4 years ago
Hi guys, I'll have a look. However, I think this is currently a 1.4 feature.
Assignee: nobody → aus
Flags: needinfo?(aus)
(Assignee)

Comment 3

4 years ago
Note to self: Uncomment mochi-tests for download object attributes as part of fixing this bug.
Status: NEW → ASSIGNED
(Assignee)

Comment 4

4 years ago
Created attachment 8347485 [details] [diff] [review]
bug945366-download-error-attribute-throws-when-accessed.patch
(Assignee)

Comment 5

4 years ago
Created attachment 8347492 [details] [diff] [review]
bug945366-download-error-attribute-throws-when-accessed.patch
Attachment #8347485 - Attachment is obsolete: true
Attachment #8347492 - Flags: review?(anygregor)
Comment on attachment 8347492 [details] [diff] [review]
bug945366-download-error-attribute-throws-when-accessed.patch

Review of attachment 8347492 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/downloads/tests/test_downloads_basic.html
@@ +53,5 @@
>  
>    // bug 948287: Accessing startTime attribute at download start fires
>    //             NS_ERROR_UNEXPECTED in emulator
> +  ok(download.startTime >= todayDate,
> +     "Download start time should be greater than or equal to today");

nit: Remove comment above

@@ +58,4 @@
>  
>    // bug 945366: Accessing error attribute at download start fires
>    //             NS_ERROR_UNEXPECTED in emulator
> +  is(download.error, null, "Download does not have an error");

nit: Remove comment above
Attachment #8347492 - Flags: review?(anygregor) → review+
(Assignee)

Comment 7

4 years ago
Created attachment 8347496 [details] [diff] [review]
bug945366-download-error-attribute-throws-when-accessed.patch

Updated patch with nits addressed. r=gwagner carries over.
Attachment #8347492 - Attachment is obsolete: true
Attachment #8347496 - Flags: review+
(Assignee)

Comment 8

4 years ago
Ready for check-in.
Keywords: checkin-needed
https://hg.mozilla.org/integration/b2g-inbound/rev/280bcef1cf7c
(In reply to Gregor Wagner [:gwagner] from comment #9)
> https://hg.mozilla.org/integration/b2g-inbound/rev/280bcef1cf7c

Please remove checkin-needed when pushing.
Flags: needinfo?(anygregor)
Keywords: checkin-needed
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #10)
> (In reply to Gregor Wagner [:gwagner] from comment #9)
> > https://hg.mozilla.org/integration/b2g-inbound/rev/280bcef1cf7c
> 
> Please remove checkin-needed when pushing.

Huh sorry. Forgot about it.
Flags: needinfo?(anygregor)
https://hg.mozilla.org/mozilla-central/rev/280bcef1cf7c
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 C1/1.4 S1(20dec)
https://hg.mozilla.org/mozilla-central/rev/51ace0ed1564
You need to log in before you can comment on or make changes to this bug.