Closed
Bug 1315624
Opened 9 years ago
Closed 9 years ago
Delete operator|| and operator&& for CastableTypedEnumResult
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(1 file)
We should delete operator|| and operator&& for CastableTypedEnumResult [1]. Defining these two operators destroy short-circuit evaluation. This leads to a real assert in [2] where PropHasFlags() is evaluated even if (aEnabled & EnabledState::eInUASheets) is false when "layout.css.prefixes.webkit" is set to false on Nightly.
BTW, "More Effective C++ Item 7" recommended never overloading these two operator as well.
[1] http://searchfox.org/mozilla-central/rev/f5c9e9a249637c9abd88754c8963ecb3838475cb/mfbt/TypedEnumBits.h#89-90
[2] http://searchfox.org/mozilla-central/rev/f5c9e9a249637c9abd88754c8963ecb3838475cb/layout/style/nsCSSProps.h#659
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 2•9 years ago
|
||
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8808092 -
Flags: review?(jwalden+bmo) → review?(nfroyd)
Comment 4•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8808092 [details]
Bug 1315624 - Delete operator&& and operator|| for CastableTypedEnumResult.
https://reviewboard.mozilla.org/r/91022/#review92810
Thank you for writing tests!
Attachment #8808092 -
Flags: review?(nfroyd) → review+
Pushed by tlin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0dfe466e790f
Delete operator&& and operator|| for CastableTypedEnumResult. r=froydnj
Comment 6•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in
before you can comment on or make changes to this bug.
Description
•