diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/00_primordials.js | 9 | ||||
-rw-r--r-- | core/internal.d.ts | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/00_primordials.js b/core/00_primordials.js index 6495a5268..243f40e88 100644 --- a/core/00_primordials.js +++ b/core/00_primordials.js @@ -434,6 +434,15 @@ }, ); + primordials.SafeRegExp = makeSafe( + RegExp, + class SafeRegExp extends RegExp { + constructor(pattern, flags) { + super(pattern, flags); + } + }, + ); + primordials.SafeFinalizationRegistry = makeSafe( FinalizationRegistry, class SafeFinalizationRegistry extends FinalizationRegistry { diff --git a/core/internal.d.ts b/core/internal.d.ts index 004e068ff..a91ac6244 100644 --- a/core/internal.d.ts +++ b/core/internal.d.ts @@ -78,6 +78,7 @@ declare namespace __bootstrap { export const SafePromisePrototypeFinally: UncurryThis< Promise.prototype.finally >; + export const SafeRegExp: typeof RegExp; // safe iterators export const SafeArrayIterator: new <T>(array: T[]) => IterableIterator<T>; |