| Index: src/jsregexp.cc
|
| diff --git a/src/jsregexp.cc b/src/jsregexp.cc
|
| index cd51db80a4ec3e4897d410afc44ed6d67c805531..cc8b0eeeaa8b9055a90bfa8662f293179c3fb9a0 100644
|
| --- a/src/jsregexp.cc
|
| +++ b/src/jsregexp.cc
|
| @@ -167,7 +167,8 @@ static bool HasFewDifferentCharacters(Handle<String> pattern) {
|
|
|
| Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
|
| Handle<String> pattern,
|
| - Handle<String> flag_str) {
|
| + Handle<String> flag_str,
|
| + Zone* zone) {
|
| Isolate* isolate = re->GetIsolate();
|
| JSRegExp::Flags flags = RegExpFlagsFromString(flag_str);
|
| CompilationCache* compilation_cache = isolate->compilation_cache();
|
| @@ -181,12 +182,11 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
|
| return re;
|
| }
|
| pattern = FlattenGetString(pattern);
|
| - ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
| PostponeInterruptsScope postpone(isolate);
|
| RegExpCompileData parse_result;
|
| FlatStringReader reader(isolate, pattern);
|
| if (!RegExpParser::ParseRegExp(&reader, flags.is_multiline(),
|
| - &parse_result)) {
|
| + &parse_result, zone)) {
|
| // Throw an exception if we fail to parse the pattern.
|
| ThrowRegExpException(re,
|
| pattern,
|
| @@ -388,7 +388,7 @@ bool RegExpImpl::CompileIrregexp(Handle<JSRegExp> re,
|
| Zone* zone) {
|
| // Compile the RegExp.
|
| Isolate* isolate = re->GetIsolate();
|
| - ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
| + ZoneScope zone_scope(zone, DELETE_ON_EXIT);
|
| PostponeInterruptsScope postpone(isolate);
|
| // If we had a compilation error the last time this is saved at the
|
| // saved code index.
|
| @@ -420,7 +420,8 @@ bool RegExpImpl::CompileIrregexp(Handle<JSRegExp> re,
|
| RegExpCompileData compile_data;
|
| FlatStringReader reader(isolate, pattern);
|
| if (!RegExpParser::ParseRegExp(&reader, flags.is_multiline(),
|
| - &compile_data)) {
|
| + &compile_data,
|
| + zone)) {
|
| // Throw an exception if we fail to parse the pattern.
|
| // THIS SHOULD NOT HAPPEN. We already pre-parsed it successfully once.
|
| ThrowRegExpException(re,
|
|
|