From 8f63831cbf56609803ea015fdfb4d021260598c9 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Tue, 30 Aug 2022 09:32:26 +0000 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. --- 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()`