| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index c6b26493ce9bcdf709248177842db4348d6736be..8a98542524b38df5e7c6c14feeee6e75ba590c7d 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -2332,8 +2332,8 @@ class ReplacementStringBuilder {
|
|
|
| class CompiledReplacement {
|
| public:
|
| - CompiledReplacement()
|
| - : parts_(1), replacement_substrings_(0) {}
|
| + explicit CompiledReplacement(Zone* zone)
|
| + : parts_(zone, 1), replacement_substrings_(zone, 0) {}
|
|
|
| void Compile(Handle<String> replacement,
|
| int capture_count,
|
| @@ -2625,8 +2625,8 @@ MUST_USE_RESULT static MaybeObject* StringReplaceRegExpWithString(
|
| int capture_count = regexp_handle->CaptureCount();
|
|
|
| // CompiledReplacement uses zone allocation.
|
| - ZoneScope zone(isolate, DELETE_ON_EXIT);
|
| - CompiledReplacement compiled_replacement;
|
| + ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
| + CompiledReplacement compiled_replacement(isolate->zone());
|
| compiled_replacement.Compile(replacement_handle,
|
| capture_count,
|
| length);
|
| @@ -3140,7 +3140,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringMatch) {
|
| int length = subject->length();
|
|
|
| ZoneScope zone_space(isolate, DELETE_ON_EXIT);
|
| - ZoneList<int> offsets(8);
|
| + ZoneList<int> offsets(isolate->zone(), 8);
|
| int start;
|
| int end;
|
| do {
|
| @@ -5810,7 +5810,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringSplit) {
|
|
|
| // 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);
|
| + ZoneList<int> indices(isolate->zone(), initial_capacity);
|
| if (!pattern->IsFlat()) FlattenString(pattern);
|
|
|
| // No allocation block.
|
|
|