Skip to content

Commit 563f9fe

Browse files
RaisinTenMoLow
authored andcommittedJul 6, 2023
doc,vm: clarify usage of cachedData in vm.compileFunction()
Fixes: #48175 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #48193 Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 67b2c2a commit 563f9fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎doc/api/vm.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,8 @@ changes:
10021002
is displayed in stack traces produced by this script. **Default:** `0`.
10031003
* `cachedData` {Buffer|TypedArray|DataView} Provides an optional `Buffer` or
10041004
`TypedArray`, or `DataView` with V8's code cache data for the supplied
1005-
source.
1005+
source. This must be produced by a prior call to [`vm.compileFunction()`][]
1006+
with the same `code` and `params`.
10061007
* `produceCachedData` {boolean} Specifies whether to produce new cache data.
10071008
**Default:** `false`.
10081009
* `parsingContext` {Object} The [contextified][] object in which the said
@@ -1590,6 +1591,7 @@ are not controllable through the timeout either.
15901591
[`script.runInContext()`]: #scriptrunincontextcontextifiedobject-options
15911592
[`script.runInThisContext()`]: #scriptruninthiscontextoptions
15921593
[`url.origin`]: url.md#urlorigin
1594+
[`vm.compileFunction()`]: #vmcompilefunctioncode-params-options
15931595
[`vm.createContext()`]: #vmcreatecontextcontextobject-options
15941596
[`vm.runInContext()`]: #vmrunincontextcode-contextifiedobject-options
15951597
[`vm.runInThisContext()`]: #vmruninthiscontextcode-options

0 commit comments

Comments
 (0)
Please sign in to comment.