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

Unified Diff: src/jsregexp.cc

Issue 12866: Fixed regexp zone issue (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 | « no previous file | src/v8-counters.h » ('j') | no next file with comments »
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 bf9d4dea4d491e6890ec59b503912fe0f5937a91..05b8aa0f82bf214265f0832036e4d35099d0c961 100644
--- a/src/jsregexp.cc
+++ b/src/jsregexp.cc
@@ -207,12 +207,15 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
JSRegExp::Flags flags = RegExpFlagsFromString(flag_str);
Handle<FixedArray> cached = CompilationCache::LookupRegExp(pattern, flags);
bool in_cache = !cached.is_null();
+ LOG(RegExpCompileEvent(re, in_cache));
+
Handle<Object> result;
if (in_cache) {
re->set_data(*cached);
result = re;
} else {
FlattenString(pattern);
+ ZoneScope zone_scope(DELETE_ON_EXIT);
RegExpParseResult parse_result;
FlatStringReader reader(pattern);
if (!ParseRegExp(&reader, flags.is_multiline(), &parse_result)) {
@@ -258,7 +261,6 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
}
}
- LOG(RegExpCompileEvent(re, in_cache));
return result;
}
« no previous file with comments | « no previous file | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698