Closed
Bug 1665661
Opened 4 years ago
Closed 4 years ago
Make UnusedZero<WindowsError>::value true to enable Result optimizations
Categories
(Core :: Widget: Win32, task)
Core
Widget: Win32
Tracking
()
RESOLVED
FIXED
83 Branch
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
References
Details
Attachments
(1 file)
WindowsError
has the same layout as HRESULT
and a S_OK
HRESULT
is 0, so an error can never be 0
. For such cases, mozilla::Result
provides optimizations, which need to be opted in by providing a specialization of UnusedZero
, like it's done for nsresult
. In particular, this allows to not use mozilla::Variant
inside the mozilla::Result
implementation, which seems to be hard to optimize away.
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Pushed by sgiesecke@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/46c0b8ec1432 Opt into UnusedZero<WindowsError>::value == true to enable mozilla::Result optimizations. r=aklotz
Comment 3•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox83:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•