From 8ef07e67e581bdd62cb3f3b94a9375c400be99fb 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 c8a0a27c991f0d..2113fafb6317cb 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -112,6 +112,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()`