Switch from Promise.defer() to new Promise()

RESOLVED FIXED in Firefox 55

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: florian, Assigned: florian)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(4 attachments)

(Assignee)

Description

2 years ago
Much of this change can be done using automated scripts.
(Assignee)

Comment 1

2 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

2 years ago
Assignee: nobody → florian
Status: NEW → ASSIGNED
(Assignee)

Comment 2

2 years ago
Posted patch hand cleanupSplinter Review
Attachment #8865257 - Flags: review?(dtownsend)
(Assignee)

Comment 3

2 years ago
This is the script I used to generate attachment 8865256 [details] [diff] [review].
Attachment #8865257 - Flags: review?(dtownsend) → review+
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

2 years ago
Sure, the diff -w has 725 changed lines instead of 2721 in the full diff.
Attachment #8865256 - Flags: review?(dtownsend) → review+

Comment 7

2 years ago
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

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c143205c3f20
https://hg.mozilla.org/mozilla-central/rev/78bda617988b
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.