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

Unified Diff: src/jsregexp.cc

Issue 13784: * Fixed bug in handling of quantified look-aheads. (Closed)
Patch Set: Created 12 years 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 | « src/jsregexp.h ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
diff --git a/src/jsregexp.cc b/src/jsregexp.cc
index 5f4f6bda51f2d1870156edb056499cf2f0ac9755..365ecb598bddc0621d0d7fd73ecb99f91ae740d4 100644
--- a/src/jsregexp.cc
+++ b/src/jsregexp.cc
@@ -271,8 +271,10 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
return Handle<Object>::null();
}
RegExpAtom* atom = parse_result.tree->AsAtom();
- if (atom != NULL && !flags.is_ignore_case()) {
- if (parse_result.has_character_escapes) {
+ if (atom != NULL &&
+ !flags.is_ignore_case() &&
+ parse_result.capture_count == 0) {
+ if (parse_result.non_simple) {
Vector<const uc16> atom_pattern = atom->data();
Handle<String> atom_string =
Factory::NewStringFromTwoByte(atom_pattern);
« no previous file with comments | « src/jsregexp.h ('k') | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698