Replace PromiseUtils.defer with Promise.withResolvers
Categories
(Toolkit :: Async Tooling, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(5 files)
Promise.withResolvers
is shipping in 121. Once we know it is stable (i.e. when 121 is shipping/about to ship), we should replace our internal PromiseUtils.defer
implementation with it.
It looks like the return result of our implementation already matches withResolvers
, so it should be a simple replace & tidy up imports.
It might be nice to remove PromiseUtils.sys.mjs completely, but that also requires working out what to do with PromiseUtils.idleDispatch
which might be better for a follow-up bug.
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D197486
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D197487
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D197488
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D197489
Comment 6•2 years ago
|
||
Mark -- how did you do this rewrite? Did you use jscodeshift
? If so, can you share your script?
Assignee | ||
Comment 7•2 years ago
|
||
(In reply to Nick Alexander :nalexander [he/him] from comment #6)
Mark -- how did you do this rewrite? Did you use
jscodeshift
? If so, can you share your script?
I probably should have used something like that, but I actually did it mainly via search & replace in VS Code.
Comment 9•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f0f477492d58
https://hg.mozilla.org/mozilla-central/rev/a153350a94b5
https://hg.mozilla.org/mozilla-central/rev/1312d3b498c2
https://hg.mozilla.org/mozilla-central/rev/72ada31bf7ca
https://hg.mozilla.org/mozilla-central/rev/a1da4237db8e
Description
•