Closed
Bug 1362882
Opened 8 years ago
Closed 8 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)
(deleted),
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
(deleted),
application/x-javascript
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Much of this change can be done using automated scripts.
Assignee | ||
Comment 1•8 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•8 years ago
|
Assignee: nobody → florian
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8865257 -
Flags: review?(dtownsend)
Assignee | ||
Comment 3•8 years ago
|
||
This is the script I used to generate attachment 8865256 [details] [diff] [review].
Assignee | ||
Comment 4•8 years ago
|
||
Updated•8 years ago
|
Attachment #8865257 -
Flags: review?(dtownsend) → review+
Comment 5•8 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•8 years ago
|
||
Sure, the diff -w has 725 changed lines instead of 2721 in the full diff.
Updated•8 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•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c143205c3f20
https://hg.mozilla.org/mozilla-central/rev/78bda617988b
Status: ASSIGNED → RESOLVED
Closed: 8 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
•