Closed Bug 1398329 Opened 5 years ago Closed 5 years ago

convert uses of "defer" to "new Promise" in client/shared (except in test/, vendor/ and widgets/ subdirs)


(DevTools :: Shared Components, enhancement, P3)

57 Branch


(firefox57 fixed)

Firefox 57
Tracking Status
firefox57 --- fixed


(Reporter: tera_1225, Assigned: tera_1225)


(Blocks 1 open bug)



(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170907220212
Blocks: 1283869
Severity: normal → enhancement
Component: Untriaged → Developer Tools: Shared Components
Priority: -- → P3
As a segment of
File list:
$ grep -R "defer()" . | grep -v "/test/" | grep -v "/vendor/" | grep -v "/widgets" | sed s/:.*// | uniq

There are quite a few in there so I thought it best to leave /test/ /vendor/ and /widgets/ for a later bug.
Attached patch Proposed patchSplinter Review
Attachment #8906138 - Flags: review?(odvarko)
Comment on attachment 8906138 [details] [diff] [review]
Proposed patch

Review of attachment 8906138 [details] [diff] [review]:

Thanks for the patch, looks good to me!

R+ assuming my comment is resolved and try is green!

Try push:


::: devtools/client/shared/AppCacheUtils.jsm
@@ +35,3 @@
>  var { gDevTools } = require("devtools/client/framework/devtools");
>  var Services = require("Services");
>  var promise = require("promise");

`promise` is never used, can be removed.
Attachment #8906138 - Flags: review?(odvarko) → review+
I'm sorry this is in a separate patch... Couldn't quite get on top of combining it into the previous patch (I'm new to mercurial).
Attachment #8907302 - Flags: review?(odvarko)
Comment on attachment 8907302 [details] [diff] [review]
Address issue raised by [:Honza] about previous patch, and extra lines caught by ES linter.

Review of attachment 8907302 [details] [diff] [review]:

Thanks for the update!

Attachment #8907302 - Flags: review?(odvarko) → review+
Please push to try yet before landing

Hi Jan. Glad everything is ok for you. Can you possible perform the push to TRY for me as I don't have access myself...
Hi Honza, even (sorry...)
Comment on attachment 8907853 [details] [diff] [review]
Another fix for errors caught by ES lint: a missing empty line at end of file, and logic error causing promise chain rejection.

Review of attachment 8907853 [details] [diff] [review]:

Thanks for the update!

Attachment #8907853 - Flags: review?(odvarko) → review+
Woops, wrong file... in last attachment 8907853 [details] [diff] [review]
Attachment #8907853 - Attachment is obsolete: true
Attachment #8908192 - Flags: review?(nchevobbe)
Assignee: nobody → tera_1225
Seems like the tests are ok, aside from a few that are intermittent failures that already have bugs.
Comment on attachment 8908192 [details] [diff] [review]

Review of attachment 8908192 [details] [diff] [review]:

Looks good to me. Thanks !
Attachment #8908192 - Flags: review?(nchevobbe) → review+
In the future, please fold your follow-up patches into the main patch before requesting checkin.
Pushed by
Convert uses of defer to new Promise in client/shared (except in test/, vendor/ and widgets/ subdirs). r=Honza, r=nchevobbe
Keywords: checkin-needed
[:RyanVM] Sorry about the multiple patches... I'm new to mercurial and trying to get the hang of the patch system. Have been setting up MozReview also so should be less trouble in the future.
Thanks for the checkin.
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.