Make EphemeralRange to accept only valid positions
This patch introduces |DCHECK_LE(start, end)| for start and end positions of
|EphemeralRange| constructor and changing call sites of constructor for
wrong start/end parameter case, to catch wrong call sites for improving code
health and ease of debugging.
This patch is intended to help to find the root cause of crbug.com/624335, which
causes null pointer reference for iterating over |nodeAsRangeFirstNode()|
of start of range to |nodeAsRangePastLastNode()| of end of range. We would
like to know which call site makes this wrong range.
BUG=624335
TEST=Covered by existing test
Review-Url: https://codereview.chromium.org/2124213002
Cr-Commit-Position: refs/heads/master@{#404308}
3 files changed