Closed
Bug 820301
Opened 12 years ago
Closed 11 years ago
Assert that ensurePersistentDataLoaded is not called on PrivateDownloadsData
Categories
(Firefox :: Downloads Panel, defect)
Firefox
Downloads Panel
Tracking
()
RESOLVED
FIXED
Firefox 21
People
(Reporter: Paolo, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
3.05 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
Internal minor enhancement, follow-up to bug 801232 comment 133, to make the meaning of the function clearer.
Assignee | ||
Comment 1•12 years ago
|
||
Is this what you mean by assert <http://mxr.mozilla.org/mozilla-central/source/toolkit/content/debug.js#32>?
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #1) > Is this what you mean by assert > <http://mxr.mozilla.org/mozilla-central/source/toolkit/content/debug.js#32>? That, or a simple if false then Cu.reportError and return. Marco, what do you think about using the JavaScript assertions module in the Downloads Panel code?
Flags: needinfo?(mak77)
Comment 3•12 years ago
|
||
NS_assert is bad cause it opens a dialog directly in the face of the user, and since it doesn't distinguish between us (devs) and the final user it can easily become an issue. Indeed we used it in Places for some time, but due to some hard to debug bugs they started appearing to the final users, and were quite harmful for UX. I think a simple Cu.reportError works fine for us.
Flags: needinfo?(mak77)
Assignee | ||
Comment 4•12 years ago
|
||
Reporter | ||
Comment 5•12 years ago
|
||
You should also remove the conditionals that check the object type later. I also expected an early return if the assertion failed, but I'll leave this style choice to Marco since we shouldn't reach that code path in any case.
Comment 6•12 years ago
|
||
(In reply to Paolo Amadini [:paolo] from comment #5) > I also expected an early return if the assertion failed, but I'll leave this > style choice to Marco since we shouldn't reach that code path in any case. I agree with early return
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #698111 -
Attachment is obsolete: true
Attachment #698111 -
Flags: review?(mak77)
Attachment #698490 -
Flags: review?(mak77)
Updated•11 years ago
|
Attachment #698490 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d51c189670fc
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d51c189670fc
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
You need to log in
before you can comment on or make changes to this bug.
Description
•