Closed Bug 1891816 Opened 3 months ago Closed 3 months ago

Refactor gOnceInitializedDeferred to use Promise.withResolvers

Categories

(Firefox :: Session Restore, task, P5)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: sfoster, Assigned: danielmazarakos, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=js] [fidefe-session-restore] )

Attachments

(1 file)

This is just a little code cleanup. gOnceInitializedDeferred was written before Promises got withResolvers as a standardized "deferred" solution. Per MDN, calling gOnceInitializedDeferred = Promise.withResolvers() should be directly equivalent to the custom deferred implementation used currently.

If you are interested in working on this, please leave a note here and check the "need info" box to notify me of your interest. You should prepare an initial patch and submit it to phabricator for review. Your patch just needs to make the indicated changes in SessionStartup.sys.mjs - there's no need for new tests or anything like that. We'll just need to make sure existing tests pass before landing the change.

Hi :) I'm a new contributor and would like to contribute to this issue.

Flags: needinfo?(sfoster)

(In reply to endington543 from comment #2)

Hi :) I'm a new contributor and would like to contribute to this issue.

Thanks for taking an interest. Go ahead and put together a patch and push it to phabricator for review. The tools and process to follow are all pretty well documented. For this ptach you only need a artifact build, you don't need all the dependencies and toolchain for building our c++ and rust code.. If you have questions getting set up, you can get help in the #introduction channel in matrix.

Flags: needinfo?(sfoster) → needinfo?(danielmazarakos)
Assignee: nobody → danielmazarakos
Status: NEW → ASSIGNED
Attachment #9398739 - Attachment description: Bug 1891816 - Refactor gOnceInitializedDeferred r=sfoster → Bug 1891816 - Refactor gOnceInitializedDeferred to use Promise.withResolves
Flags: needinfo?(danielmazarakos)
Attachment #9398739 - Attachment description: Bug 1891816 - Refactor gOnceInitializedDeferred to use Promise.withResolves → Bug 1891816 - Refactor gOnceInitializedDeferred to use Promise.withResolvers
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37aaa704c1d0
Refactor gOnceInitializedDeferred to use Promise.withResolvers r=sessionstore-reviewers,sfoster
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: