Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 42a1c7e317863d57cf3f406e3ad099ec44793053..707ace30cac4b67a04843afa564361de485ff8f7 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -15666,6 +15666,13 @@ MaybeHandle<JSRegExp> JSRegExp::New(Handle<String> pattern, |
} |
+// static |
+Handle<JSRegExp> JSRegExp::Copy(Handle<JSRegExp> regexp) { |
+ Isolate* const isolate = regexp->GetIsolate(); |
+ return Handle<JSRegExp>::cast(isolate->factory()->CopyJSObject(regexp)); |
+} |
+ |
+ |
static JSRegExp::Flags RegExpFlagsFromString(Handle<String> flags, |
bool* success) { |
uint32_t value = JSRegExp::NONE; |