Make Position::operator==() not to take null Position |
||||
Issue descriptionComparePositions(null,0, null,0) crashes with DCHECK but Position() == Position(). If we have compare(), we think operator==() is defined using the compare(). That's not true in Position and its variant types(VisiblePositions).
,
Jul 20 2017
EqualDeprecated() can be written as
template <typename Strategy>
bool PostionTempalte<Strategy>::EqualsDeprecated(const PositionTempalte<Strategy>& other) {
if (IsNull())
return other.IsNull();
if (other.isNull())
return false;
return *this == other;
}
For Step 1 in #c1, we should #if out operator==() then use compilation error to
detect usage.
We should not forget to replace operator!=() too.
,
Sep 19 2017
See also http://crbug.com/719343 Should not use Position::operator==() and operator!=()
,
Sep 19
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 20
|
||||
►
Sign in to add a comment |
||||
Comment 1 by yoichio@chromium.org
, Jul 20 2017