Closed
Bug 1227474
Opened 9 years ago
Closed 9 years ago
Promisify all client methods
Categories
(DevTools :: Framework, defect)
DevTools
Framework
Tracking
(firefox45 fixed)
RESOLVED
FIXED
Firefox 45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file)
2.00 KB,
patch
|
jryans
:
review+
|
Details | Diff | Splinter Review |
This is very frustrating when using Client APIs today as some returns promises and some others don't. The very manual `DebuggerClient.request()` is going to return a promise, whereas all the Client objects defined in devtools/shared/client/main.js that uses `requester` won't! And all other client using protocol.js fronts are also returning promises. Because of this, we end up creating inline promises everywhere we have to call a requester method while using Task.jsm. Like: http://mxr.mozilla.org/mozilla-central/source/devtools/client/framework/connect/connect.js#93 And it is all related to requester not returning the call the DebuggerClient.request. At first, I thought changing this to return the promise would break many tests, but it looks like, it doesn't: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d5c6dbf9aa1d I would like to land this, spread the word about this and may be try to remove a bunch of these inlined promises that kill the readability of our codebase in various places.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8691333 -
Flags: review?(jryans)
Assignee | ||
Comment 2•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=efff60afef52
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3e082fe0d914
Comment on attachment 8691333 [details] [diff] [review] patch v1 Review of attachment 8691333 [details] [diff] [review]: ----------------------------------------------------------------- Hmm, seems too simple. :P Please at least file a bug to clean up the inline usages. What about the top-level methods in `DebuggerClient.prototype`? Many of those don't use `requester`, but would still benefit from promises.
Attachment #8691333 -
Flags: review?(jryans) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Yes, I started cleanup up the codebase to benefit from new requester behavior and hit DebuggerClient.connect/close not being promise ready.
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/1f527cd0e45af932a8b825ee1e24e74c7c85324a Bug 1227474 - Promisify all client methods. r=jryans
Comment 7•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1f527cd0e45a
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•