From 4e6f7862baa403d4c8d2a3428879c0ca057816e1 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Wed, 7 Sep 2022 01:26:22 +0800 Subject: [PATCH] doc: document attribute Script.cachedDataRejected Explicitly document the attribute `Script.cachedDataRejected` in a dedicated section. Removes the documented option `produceCachedData` and the description of `cachedDataRejected` in `vm.runInContext`, `vm.runInNewContext`, and `vm.runInThisContext` as the created `vm.Script` instance is not accessible from userland in these methods. PR-URL: https://github.com/nodejs/node/pull/44451 Reviewed-By: Luigi Pinca --- doc/api/vm.md | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/doc/api/vm.md b/doc/api/vm.md index aa99c8430767a0..ea8d46512857cf 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -114,6 +114,18 @@ Creating a new `vm.Script` object compiles `code` but does not run it. The compiled `vm.Script` can be run later multiple times. The `code` is not bound to any global object; rather, it is bound before each run, just for that run. +### `script.cachedDataRejected` + + + +* {boolean|undefined} + +When `cachedData` is supplied to create the `vm.Script`, this value will be set +to either `true` or `false` depending on acceptance of the data by V8. +Otherwise the value is `undefined`. + ### `script.createCachedData()`