Closed Bug 1685679 Opened 5 years ago Closed 5 years ago

Add do_Init function to allow assigning to an InitializedOnce variable once

Categories

(Core :: MFBT, task)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: sg, Assigned: sg)

References

Details

Attachments

(1 file)

Add a do_init function so that an InitializedOnce variable can use assignment for initialization. This is particularly useful in connection with MOZ_TRY_VAR et al.:

InitializedOnce<const Foo> foo;
MOZ_TRY_VAR(do_init(foo), FunctionReturningFoo());
Attachment #9196040 - Attachment description: Bug 1685679 - Add do_init function to allow assignment to InitializedOnce variables. r=janv → Bug 1685679 - Add do_Init function to allow assignment to InitializedOnce variables. r=janv
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37950806746b Add do_Init function to allow assignment to InitializedOnce variables. r=janv
Summary: Add do_init function to allow assigning to an InitializedOnce variable once → Add do_Init function to allow assigning to an InitializedOnce variable once
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: