Closed Bug 1398329 Opened 4 years ago Closed 4 years ago

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

Categories

(DevTools :: Shared Components, enhancement, P3)

57 Branch
enhancement

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: tera_1225, Assigned: tera_1225)

References

(Blocks 1 open bug)

Details

Attachments

(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 https://bugzilla.mozilla.org/show_bug.cgi?id=1283869
File list:
$ grep -R "defer()" . | grep -v "/test/" | grep -v "/vendor/" | grep -v "/widgets" | sed s/:.*// | uniq
./AppCacheUtils.jsm
./developer-toolbar.js
./doorhanger.js
./frame-script-utils.js
./getjson.js
./poller.js
./redux/middleware/promise.js

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:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5d82b099c6e3327b1983d65e623ccd95b86cd5dc

Honza

::: 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!

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

Honza
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!

Honza
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
Status: NEW → ASSIGNED
Seems like the tests are ok, aside from a few that are intermittent failures that already have bugs.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=644bf92233d13d2378aecdc5a5629e9d695772db&selectedJob=131105247
Comment on attachment 8908192 [details] [diff] [review]
Bug1398329-4.patch

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 ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e5d3009b7d0a
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.
Regards,
Mark.
https://hg.mozilla.org/mozilla-central/rev/e5d3009b7d0a
Status: ASSIGNED → RESOLVED
Closed: 4 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.