Index: src/regexp/jsregexp.cc |
diff --git a/src/regexp/jsregexp.cc b/src/regexp/jsregexp.cc |
index 4e33e4ac7807849d1b137675bb400d88acf9626b..20f5a289dbd8a789d196ffbe695ce16dfdf81616 100644 |
--- a/src/regexp/jsregexp.cc |
+++ b/src/regexp/jsregexp.cc |
@@ -135,6 +135,8 @@ static bool HasFewDifferentCharacters(Handle<String> pattern) { |
MaybeHandle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, |
Handle<String> pattern, |
JSRegExp::Flags flags) { |
+ DCHECK(pattern->IsFlat()); |
+ |
Isolate* isolate = re->GetIsolate(); |
Zone zone(isolate->allocator(), ZONE_NAME); |
CompilationCache* compilation_cache = isolate->compilation_cache(); |
@@ -145,7 +147,7 @@ MaybeHandle<Object> RegExpImpl::Compile(Handle<JSRegExp> re, |
re->set_data(*cached); |
return re; |
} |
- pattern = String::Flatten(pattern); |
+ |
PostponeInterruptsScope postpone(isolate); |
RegExpCompileData parse_result; |
FlatStringReader reader(isolate, pattern); |