Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: src/regexp/jsregexp.h

Issue 1768093002: [regexp] Fix off-by-one in CharacterRange::Negate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/regexp/jsregexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/jsregexp.h
diff --git a/src/regexp/jsregexp.h b/src/regexp/jsregexp.h
index 1d152dcfb2536e1a7c5f65a33d5b468787fea8d1..e55d650fab14316e10c34e75fc9f3b4a79be2169 100644
--- a/src/regexp/jsregexp.h
+++ b/src/regexp/jsregexp.h
@@ -268,7 +268,9 @@ class DispatchTable : public ZoneObject {
public:
Entry() : from_(0), to_(0), out_set_(NULL) { }
Entry(uc32 from, uc32 to, OutSet* out_set)
- : from_(from), to_(to), out_set_(out_set) {}
+ : from_(from), to_(to), out_set_(out_set) {
+ DCHECK(from <= to);
+ }
uc32 from() { return from_; }
uc32 to() { return to_; }
void set_to(uc32 value) { to_ = value; }
« no previous file with comments | « no previous file | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698