Index: src/runtime/runtime-regexp.cc |
diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc |
index 9a4c8da6e4f0e121aa1ea9774fc9f9fe0f2b2243..b36e5e66cbae17b447958a05c6ef192a94197272 100644 |
--- a/src/runtime/runtime-regexp.cc |
+++ b/src/runtime/runtime-regexp.cc |
@@ -393,8 +393,8 @@ |
DCHECK(subject->IsFlat()); |
DCHECK(replacement->IsFlat()); |
- Zone zone(isolate->allocator()); |
- ZoneList<int> indices(8, &zone); |
+ ZoneScope zone_scope(isolate->runtime_zone()); |
+ ZoneList<int> indices(8, zone_scope.zone()); |
DCHECK_EQ(JSRegExp::ATOM, pattern_regexp->TypeTag()); |
String* pattern = |
String::cast(pattern_regexp->DataAt(JSRegExp::kAtomPatternIndex)); |
@@ -403,7 +403,7 @@ |
int replacement_len = replacement->length(); |
FindStringIndicesDispatch(isolate, *subject, pattern, &indices, 0xffffffff, |
- &zone); |
+ zone_scope.zone()); |
int matches = indices.length(); |
if (matches == 0) return *subject; |
@@ -474,8 +474,8 @@ |
int subject_length = subject->length(); |
// CompiledReplacement uses zone allocation. |
- Zone zone(isolate->allocator()); |
- CompiledReplacement compiled_replacement(&zone); |
+ ZoneScope zone_scope(isolate->runtime_zone()); |
+ CompiledReplacement compiled_replacement(zone_scope.zone()); |
bool simple_replace = |
compiled_replacement.Compile(replacement, capture_count, subject_length); |
@@ -711,17 +711,17 @@ |
static const int kMaxInitialListCapacity = 16; |
- Zone zone(isolate->allocator()); |
+ ZoneScope zone_scope(isolate->runtime_zone()); |
// Find (up to limit) indices of separator and end-of-string in subject |
int initial_capacity = Min<uint32_t>(kMaxInitialListCapacity, limit); |
- ZoneList<int> indices(initial_capacity, &zone); |
+ ZoneList<int> indices(initial_capacity, zone_scope.zone()); |
FindStringIndicesDispatch(isolate, *subject, *pattern, &indices, limit, |
- &zone); |
+ zone_scope.zone()); |
if (static_cast<uint32_t>(indices.length()) < limit) { |
- indices.Add(subject_length, &zone); |
+ indices.Add(subject_length, zone_scope.zone()); |
} |
// The list indices now contains the end of each part to create. |