Closed
Bug 1095119
Opened 10 years ago
Closed 9 years ago
Remove Promise.defer usage
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
RESOLVED
FIXED
4.0.0.1
People
(Reporter: Fallen, Assigned: discoman)
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(2 files, 2 obsolete files)
5.64 KB,
patch
|
discoman
:
review+
|
Details | Diff | Splinter Review |
1.51 KB,
patch
|
Details | Diff | Splinter Review |
I totally liked Promise.defer, but this is not a feature of DOM promises, which will supersede Promise.jsm at some point and will be removed in bug 1034599. We need to replace them with DOM promises in calendar code or use PromiseUtils from bug 1093021.
Assignee | ||
Comment 1•9 years ago
|
||
https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred Here, I realized that implementation of new Promise() as deferred object would require a helper function first and so it's better to look out for places where new Promise can be implemented easily and I found it was in only test_deleted_items.js, every where else our beloved deferred object is used to resolve promise in different parts of code,so I implemented new Promise() here. Would request a review and help in case I have done something wrong.
Attachment #8556857 -
Flags: review?(philipp)
Reporter | ||
Comment 2•9 years ago
|
||
Comment on attachment 8556857 [details] [diff] [review] bug-1095119.diff Review of attachment 8556857 [details] [diff] [review]: ----------------------------------------------------------------- You are right, we surprisingly don't use promises that much. Code looks great, thanks for the patch! Let me know if you need more issues to work on. r=philipp. For checkin, could you change the patch message from "Remove Promise.defer" to something like "Bug 1095119 - Remove Promise.defer usage. r=philipp", upload that as a new attachment and set the checkin-needed keyword? You can directly set review+ on the new patch since I've already +'d this one.
Attachment #8556857 -
Flags: review?(philipp) → review+
Reporter | ||
Updated•9 years ago
|
Assignee: nobody → sparshpaliwal123
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•9 years ago
|
||
Thank you very much for the help,I never submitted a patch so quickly. If something is wrong with this one we will get back to it. Meanwhile which of these you think i should do next- Bug-366680 Bug-396515 Bug-842383 Bug-472630
Attachment #8557016 -
Flags: review+
Attachment #8557016 -
Flags: checkin?
Reporter | ||
Updated•9 years ago
|
Attachment #8557016 -
Flags: checkin?
Reporter | ||
Updated•9 years ago
|
Keywords: checkin-needed
Reporter | ||
Updated•9 years ago
|
Attachment #8556857 -
Attachment is obsolete: true
Reporter | ||
Comment 4•9 years ago
|
||
I think bug 472630 would be nice, if you want another simple one then bug 842383 is also a good candidate.
Reporter | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 4.0
The patch caused a failure in the test it is touching: TEST-UNEXPECTED-FAIL | xpcshell-icaljs.ini:calendar/test/unit/test_deleted_items.js | xpcshell return code: 0 SyntaxError: expected expression, got ')' at /builds/slave/test/build/tests/xpcshell/tests/calendar/test/unit/test_deleted_items.js:31 ReferenceError: run_test is not defined at /builds/slave/test/build/tests/xpcshell/head.js:504 I try to fix the syntax error in this patch. Aryx, please push to try server.
Flags: needinfo?(archaeopteryx)
Comment 6•9 years ago
|
||
Pushed to Thunderbird-Try https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=805e9cd652fa
Flags: needinfo?(archaeopteryx)
Didn't work :)
Attachment #8557388 -
Attachment is obsolete: true
Attachment #8557426 -
Flags: review?(philipp)
Comment 8•9 years ago
|
||
Comment on attachment 8557016 [details] [diff] [review] bug-1095119.diff http://hg.mozilla.org/comm-central/rev/613cf9f167f3
Reporter | ||
Updated•9 years ago
|
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•9 years ago
|
||
Pushed to comm-central changeset 12201ec2a310
Reporter | ||
Comment 10•9 years ago
|
||
Sorry about the missing push comment, my python script had an error. I'll update the other bugs in case they haven't already been.
Reporter | ||
Comment 11•9 years ago
|
||
Comment on attachment 8557426 [details] [diff] [review] fix test failure v2 Oops I totally missed you already uploaded a patch, sorry about that. The patch I pushed does about the same thing and also fixes the order of setting the handleCompletion function and calling aFunc().
Attachment #8557426 -
Flags: review?(philipp)
You need to log in
before you can comment on or make changes to this bug.
Description
•