Closed
Bug 1683227
Opened 3 years ago
Closed 3 years ago
Add a note to Maybe::valueOr() describing its argument is always evaluated
Categories
(Core :: MFBT, enhancement)
Core
MFBT
Tracking
()
RESOLVED
FIXED
86 Branch
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(1 file)
Maybe::valueOr() always evaluates its arguments, but the natural of this method may confuse people to think its argument is only evaluated when Maybe contains no value.
We'd better add a note to warn people not calling expensive function to provide the default value. Emilio had caught this during reviews.
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Attachment #9193845 -
Attachment description: Bug 1683227 - Add a note to Maybe::valueOr() describing its argument is always evaluated. → Bug 1683227 - Add a note to Maybe::valueOr() about a suboptimal usage.
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e9c936e74e47 Add a note to Maybe::valueOr() about a suboptimal usage. r=sg DONTBUILD
Comment 3•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox86:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•