From 160fe9787ee33c5cfda7218d4ca232345c7fa06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 26 May 2023 15:41:03 +0200 Subject: fix(node): make 'v8.setFlagsFromString' a noop (#19271) Towards https://github.com/denoland/deno/issues/16460 --- ext/node/polyfills/v8.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/node/polyfills/v8.ts b/ext/node/polyfills/v8.ts index 27feb1cec..e411b541e 100644 --- a/ext/node/polyfills/v8.ts +++ b/ext/node/polyfills/v8.ts @@ -42,7 +42,14 @@ export function getHeapStatistics() { } export function setFlagsFromString() { - notImplemented("v8.setFlagsFromString"); + // NOTE(bartlomieju): From Node.js docs: + // The v8.setFlagsFromString() method can be used to programmatically set V8 + // command-line flags. This method should be used with care. Changing settings + // after the VM has started may result in unpredictable behavior, including + // crashes and data loss; or it may simply do nothing. + // + // Notice: "or it may simply do nothing". This is what we're gonna do, + // this function will just be a no-op. } export function stopCoverage() { notImplemented("v8.stopCoverage"); -- cgit v1.2.3