Closed
Bug 1362882
Opened 7 years ago
Closed 7 years ago
Switch from Promise.defer() to new Promise()
Categories
(Toolkit :: Async Tooling, enhancement)
Toolkit
Async Tooling
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(4 files)
329.50 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
4.40 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
17.12 KB,
application/x-javascript
|
Details | |
241.25 KB,
patch
|
Details | Diff | Splinter Review |
Much of this change can be done using automated scripts.
Assignee | ||
Comment 1•7 years ago
|
||
This handles only the cases that are 'straightforward', ie. where the output of Promise.defer() is assigned to a local variable that isn't re-used for something else. Restricting to this specific (most common) case lets the script completely remove the variable.
Attachment #8865256 -
Flags: review?(dtownsend)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → florian
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8865257 -
Flags: review?(dtownsend)
Assignee | ||
Comment 3•7 years ago
|
||
This is the script I used to generate attachment 8865256 [details] [diff] [review].
Assignee | ||
Comment 4•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b08453ff9df93104919bc32adc98af81d2e08b8b looks pretty green.
Updated•7 years ago
|
Attachment #8865257 -
Flags: review?(dtownsend) → review+
Comment 5•7 years ago
|
||
Comment on attachment 8865256 [details] [diff] [review] script-generated patch Review of attachment 8865256 [details] [diff] [review]: ----------------------------------------------------------------- Can I get a diff -w for this patch?
Assignee | ||
Comment 6•7 years ago
|
||
Sure, the diff -w has 725 changed lines instead of 2721 in the full diff.
Updated•7 years ago
|
Attachment #8865256 -
Flags: review?(dtownsend) → review+
Pushed by florian@queze.net: https://hg.mozilla.org/mozilla-central/rev/c143205c3f20 script-generated patch to switch from Promise.defer() to new Promise() where it's straightforward, rs=Mossop. https://hg.mozilla.org/mozilla-central/rev/78bda617988b hand cleanup after applying the previous script-generated patch, r=Mossop.
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c143205c3f20 https://hg.mozilla.org/mozilla-central/rev/78bda617988b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•