Closed Bug 1315624 Opened 3 years ago Closed 3 years ago
Delete operator|| and operator&& for Castable
Typed Enum Result
58 bytes, text/x-review-board-request
We should delete operator|| and operator&& for CastableTypedEnumResult . Defining these two operators destroy short-circuit evaluation. This leads to a real assert in  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.  http://searchfox.org/mozilla-central/rev/f5c9e9a249637c9abd88754c8963ecb3838475cb/mfbt/TypedEnumBits.h#89-90  http://searchfox.org/mozilla-central/rev/f5c9e9a249637c9abd88754c8963ecb3838475cb/layout/style/nsCSSProps.h#659
Attachment #8808092 - Flags: review?(jwalden+bmo) → review?(nfroyd)
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 email@example.com: https://hg.mozilla.org/integration/autoland/rev/0dfe466e790f Delete operator&& and operator|| for CastableTypedEnumResult. r=froydnj
You need to log in before you can comment on or make changes to this bug.