@@ -114,6 +114,18 @@ Creating a new `vm.Script` object compiles `code` but does not run it. The
114
114
compiled ` vm.Script ` can be run later multiple times. The ` code ` is not bound to
115
115
any global object; rather, it is bound before each run, just for that run.
116
116
117
+ ### ` script.cachedDataRejected `
118
+
119
+ <!-- YAML
120
+ added: v5.7.0
121
+ -->
122
+
123
+ * {boolean|undefined}
124
+
125
+ When ` cachedData ` is supplied to create the ` vm.Script ` , this value will be set
126
+ to either ` true ` or ` false ` depending on acceptance of the data by V8.
127
+ Otherwise the value is ` undefined ` .
128
+
117
129
### ` script.createCachedData() `
118
130
119
131
<!-- YAML
@@ -1154,16 +1166,7 @@ changes:
1154
1166
work after that. **Default:** `false`.
1155
1167
* `cachedData` {Buffer|TypedArray|DataView} Provides an optional `Buffer` or
1156
1168
`TypedArray`, or `DataView` with V8' s code cache data for the supplied
1157
- source . When supplied, the ` cachedDataRejected` value will be set to
1158
- either ` true` or ` false` depending on acceptance of the data by V8 .
1159
- * ` produceCachedData` {boolean} When ` true` and no ` cachedData` is present, V8
1160
- will attempt to produce code cache data for ` code` . Upon success, a
1161
- ` Buffer` with V8 ' s code cache data will be produced and stored in the
1162
- `cachedData` property of the returned `vm.Script` instance.
1163
- The `cachedDataProduced` value will be set to either `true` or `false`
1164
- depending on whether code cache data is produced successfully.
1165
- This option is **deprecated** in favor of `script.createCachedData()`.
1166
- **Default:** `false`.
1169
+ source.
1167
1170
* ` importModuleDynamically` {Function } Called during evaluation of this module
1168
1171
when ` import()` is called . If this option is not specified, calls to
1169
1172
` import()` will reject with [` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING` ][].
@@ -1262,16 +1265,7 @@ changes:
1262
1265
module will throw a ` WebAssembly .CompileError ` . **Default:** ` true ` .
1263
1266
* ` cachedData` {Buffer|TypedArray|DataView} Provides an optional ` Buffer` or
1264
1267
` TypedArray` , or ` DataView ` with V8's code cache data for the supplied
1265
- source . When supplied, the ` cachedDataRejected` value will be set to
1266
- either ` true` or ` false` depending on acceptance of the data by V8 .
1267
- * ` produceCachedData` {boolean} When ` true` and no ` cachedData` is present, V8
1268
- will attempt to produce code cache data for ` code` . Upon success, a
1269
- ` Buffer` with V8 ' s code cache data will be produced and stored in the
1270
- `cachedData` property of the returned `vm.Script` instance.
1271
- The `cachedDataProduced` value will be set to either `true` or `false`
1272
- depending on whether code cache data is produced successfully.
1273
- This option is **deprecated** in favor of `script.createCachedData()`.
1274
- **Default:** `false`.
1268
+ source.
1275
1269
* ` importModuleDynamically` {Function} Called during evaluation of this module
1276
1270
when ` import ()` is called. If this option is not specified, calls to
1277
1271
` import ()` will reject with [` ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING ` ][].
@@ -1351,16 +1345,7 @@ changes:
1351
1345
work after that. ** Default: ** ` false` .
1352
1346
* ` cachedData` {Buffer| TypedArray| DataView } Provides an optional ` Buffer` or
1353
1347
` TypedArray` , or ` DataView` with V8 ' s code cache data for the supplied
1354
- source . When supplied, the ` cachedDataRejected` value will be set to
1355
- either ` true` or ` false` depending on acceptance of the data by V8 .
1356
- * ` produceCachedData` {boolean} When ` true` and no ` cachedData` is present, V8
1357
- will attempt to produce code cache data for ` code` . Upon success, a
1358
- ` Buffer` with V8 ' s code cache data will be produced and stored in the
1359
- `cachedData` property of the returned `vm.Script` instance.
1360
- The `cachedDataProduced` value will be set to either `true` or `false`
1361
- depending on whether code cache data is produced successfully.
1362
- This option is **deprecated** in favor of `script.createCachedData()`.
1363
- **Default:** `false`.
1348
+ source.
1364
1349
* `importModuleDynamically` {Function} Called during evaluation of this module
1365
1350
when `import()` is called. If this option is not specified, calls to
1366
1351
`import()` will reject with [`ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING`][].
0 commit comments