Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 61f738e0ac2dc3d001f0cb6ff7f4f2f438d89bb1..11bba2372b36a1e21c3574907fc56c0d01721ff8 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10310,6 +10310,15 @@ Handle<ArrayList> ArrayList::EnsureSpace(Handle<ArrayList> array, int length) { |
return ret; |
} |
+Handle<RegExpMatchInfo> RegExpMatchInfo::ReserveCaptures( |
+ Handle<RegExpMatchInfo> match_info, int capture_count) { |
+ DCHECK_GE(match_info->length(), kLastMatchOverhead); |
+ const int required_length = kFirstCaptureIndex + capture_count; |
+ Handle<FixedArray> result = |
+ EnsureSpaceInFixedArray(match_info, required_length); |
+ return Handle<RegExpMatchInfo>::cast(result); |
+} |
+ |
// static |
Handle<FrameArray> FrameArray::AppendJSFrame(Handle<FrameArray> in, |
Handle<Object> receiver, |