Closed Bug 1362882 Opened 8 years ago Closed 8 years ago

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

Categories

(Toolkit :: Async Tooling, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(4 files)

Much of this change can be done using automated scripts.
Attached patch script-generated patch (deleted) — Splinter Review
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: nobody → florian
Status: NEW → ASSIGNED
Attached patch hand cleanup (deleted) — Splinter Review
Attachment #8865257 - Flags: review?(dtownsend)
Attached file promise.defer.js xpcshell script (deleted) —
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?
Sure, the diff -w has 725 changed lines instead of 2721 in the full diff.
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.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: