Index: src/regexp/regexp-ast.h |
diff --git a/src/regexp/regexp-ast.h b/src/regexp/regexp-ast.h |
index 4a81ccaf1b4444042e653a3f1a3e7f4fa071638f..89cbf9b9ff94c0eacdb3bbddce680c7d57aa3765 100644 |
--- a/src/regexp/regexp-ast.h |
+++ b/src/regexp/regexp-ast.h |
@@ -78,7 +78,9 @@ class CharacterRange { |
CharacterRange() : from_(0), to_(0) {} |
// For compatibility with the CHECK_OK macro |
CharacterRange(void* null) { DCHECK_NULL(null); } // NOLINT |
- CharacterRange(uc32 from, uc32 to) : from_(from), to_(to) {} |
+ CharacterRange(uc32 from, uc32 to) : from_(from), to_(to) { |
+ DCHECK(from <= to); |
+ } |
static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges, |
Zone* zone); |
static Vector<const int> GetWordBounds(); |