Closed
Bug 1027347
Opened 11 years ago
Closed 11 years ago
downloadError on individual app should not always be an error object
Categories
(Core Graveyard :: DOM: Apps, defect)
Tracking
(blocking-b2g:2.0+, firefox31 wontfix, firefox32 fixed, firefox33 fixed, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: jlal, Assigned: jlal)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file, 3 obsolete files)
I think the intent here should be .downloadError contains the last error for that particular app if there was an error downloading. The current logic https://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.js#435 is always return a download error but the name is blank if there was no error.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jlal
Comment 1•11 years ago
|
||
James - Should this be marked as 2.0+ given that this blocks bug 1027935? If so, can you nom this for 2.0?
Flags: needinfo?(jlal)
Assignee | ||
Updated•11 years ago
|
blocking-b2g: --- → 2.0?
Flags: needinfo?(jlal)
Updated•11 years ago
|
blocking-b2g: 2.0? → 2.0+
Whiteboard: [systemsfe]
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8446314 -
Flags: review?(fabrice)
Assignee | ||
Comment 3•11 years ago
|
||
Try:
https://tbpl.mozilla.org/?tree=Try&rev=7f68d1f91d65
I did a potentially sketchy thing which is update state on the child process side for the downloadError during our success events... This has a big upside which is we don't need to explicitly clear the error all over in Webapps.jsm (I still clear there but for the beginning of downloads)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8446314 -
Attachment is obsolete: true
Attachment #8446314 -
Flags: review?(fabrice)
Attachment #8446335 -
Flags: review?(fabrice)
Assignee | ||
Comment 5•11 years ago
|
||
Updated to actually override error to null if .error was sent. Might be better to just always set .downloadError to null if .error is sent.
https://tbpl.mozilla.org/?tree=Try&rev=6b9b27fddeed
Updated•11 years ago
|
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking+]
Comment 6•11 years ago
|
||
Comment on attachment 8446335 [details] [diff] [review]
Only set downloadError to an error if it actually is an error and clear past errors after successful states
Review of attachment 8446335 [details] [diff] [review]:
-----------------------------------------------------------------
I just want to take another quick look before landing.
::: dom/apps/src/Webapps.js
@@ +589,5 @@
> this[prop] = aMsg.app[prop];
> }
> }
>
> + if ('error' in aMsg) {
it's actually slower than the original.
@@ +648,5 @@
> + // If we are in a successful state clear any past errors.
> + if (
> + aEventType === 'downloadapplied' ||
> + aEventType === 'downloadsuccess'
> + ) {
nit: the usual style is :
if (aEventType === 'downloadapplied' ||
aEventType === 'downloadsuccess') {
@@ +649,5 @@
> + if (
> + aEventType === 'downloadapplied' ||
> + aEventType === 'downloadsuccess'
> + ) {
> + dump('Webapps.js - clear error\n');
No unconditional dump() please.
Attachment #8446335 -
Flags: review?(fabrice) → feedback+
Assignee | ||
Comment 7•11 years ago
|
||
re the use of 'in' I am not trying to check for "is it truthy" I am trying to check for "does the property exist" so when I set it to null it will be picked up.
dump is a typo new patch in a sec.
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8446335 -
Attachment is obsolete: true
Attachment #8446355 -
Flags: review?(fabrice)
Comment 9•11 years ago
|
||
Comment on attachment 8446355 [details] [diff] [review]
Only set downloadError to an error if it actually is an error and clear past errors after successful states
Review of attachment 8446355 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/apps/src/Webapps.js
@@ +649,5 @@
> + // If we are in a successful state clear any past errors.
> + if (
> + aEventType === 'downloadapplied' ||
> + aEventType === 'downloadsuccess'
> + ) {
you did not change the style there.
Attachment #8446355 -
Flags: review?(fabrice)
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #8446355 -
Attachment is obsolete: true
Attachment #8446356 -
Flags: review?(fabrice)
Assignee | ||
Comment 11•11 years ago
|
||
Sorry not sure how I missed that comment...
Updated•11 years ago
|
Attachment #8446356 -
Flags: review?(fabrice) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Keywords: checkin-needed
Updated•11 years ago
|
Assignee: jlal → kgrandon
Target Milestone: --- → 2.0 S5 (4july)
Assignee | ||
Comment 13•11 years ago
|
||
I am greedy and want to be the assignee this this work is already done pending central landing... I will watch it until then.
Assignee: kgrandon → jlal
Comment 14•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 15•11 years ago
|
||
status-b2g-v2.0:
--- → fixed
status-b2g-v2.1:
--- → fixed
status-firefox31:
--- → wontfix
status-firefox32:
--- → fixed
status-firefox33:
--- → fixed
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•