Closed Bug 1563065 Opened 6 years ago Closed 6 years ago

mozilla::Result can't carry MOZ_NON_PARAM success values

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jimb, Assigned: jimb)

References

Details

Attachments

(1 file)

mozilla::Result cannot carry a MOZ_NON_PARAM type as its success type, because the constructor for ResultImplementation passes the success value by value, which is what MOZ_NON_PARAM forbids.

Changing the constructors of the various ResultImplementation specializations and the Result front end to pass the value by const reference allows MOZ_NON_PARAM success types to work.

Change the ResultImplementation and Result constructors to accept success
values by const reference. This makes it possible for Result to carry
MOZ_NON_PARAM types as success values.

Blocks: 1470558
Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/921eab31ab8e Use const& in mozilla::Result constructors. r=froydnj
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → jimb
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: