Closed
Bug 1142540
Opened 11 years ago
Closed 11 years ago
[Messages][Refactoring] Use Promise as return result for public contacts.js methods
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect)
Tracking
(b2g-master fixed)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| b2g-master | --- | fixed |
People
(Reporter: azasypkin, Assigned: julienw)
References
Details
Attachments
(2 files)
After bug 839838 DOMRequest has Promise-based "then()" method. So we can use "navigation.mozContacts.find()" return result as Promise and migrate all public callback-based methods from contacts.js to promises.
It should simplify the code base, especially some places where contacts.js consumers use "Utils.Promise.defer()" to simulate Promise-based interface.
| Reporter | ||
Comment 1•11 years ago
|
||
Will try to do this refactoring before we start fixing recipients-related bugs - hope this will make it easier.
Assignee: nobody → azasypkin
Status: NEW → ASSIGNED
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
| Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8585333 [details] [review]
[gaia] julienw:1142540-contact-promises > mozilla-b2g:master
Hey Oleg,
you're likely the best to review this because you also looked at this issue previously :)
I tested on device various situations and I could not make it break.
Tell me what you think !
Attachment #8585333 -
Flags: review?(azasypkin)
| Assignee | ||
Updated•11 years ago
|
Assignee: azasypkin → felash
| Assignee | ||
Comment 5•11 years ago
|
||
OK Oleg, I think it's ready for a second review. I've put all changes in a separate commit !
Flags: needinfo?(azasypkin)
| Reporter | ||
Comment 6•11 years ago
|
||
Comment on attachment 8585333 [details] [review]
[gaia] julienw:1142540-contact-promises > mozilla-b2g:master
Looks good now! Just fix one typo and nit in unit test before landing.
Thanks!
Flags: needinfo?(azasypkin)
Attachment #8585333 -
Flags: review?(azasypkin) → review+
Updated•11 years ago
|
Keywords: checkin-needed
Comment 8•11 years ago
|
||
http://docs.taskcluster.net/tools/task-graph-inspector/#PVX9vDT3SuavQpI5CiVQ3g
The pull request failed to pass integration tests. It could not be landed, please try again.
| Assignee | ||
Comment 9•11 years ago
|
||
Unrelated issue, landing:
master: 43f67fb074c326286bdb15b31749b0905d427558
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•11 years ago
|
status-b2g-master:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•