diff options
author | Andres Suarez <zertosh@gmail.com> | 2017-02-23 02:04:48 -0500 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-03-05 14:23:02 +0100 |
commit | 70beef97bdf21b52632492c3b54b067a331ea068 (patch) | |
tree | 402b730c74e04058375e25d7f49830dafe36d759 /doc/api/v8.md | |
parent | 94d1c8d1b0f85faba7c594631d1065eee957afda (diff) | |
download | android-node-v8-70beef97bdf21b52632492c3b54b067a331ea068.tar.gz android-node-v8-70beef97bdf21b52632492c3b54b067a331ea068.tar.bz2 android-node-v8-70beef97bdf21b52632492c3b54b067a331ea068.zip |
v8: add cachedDataVersionTag
Adds `v8.cachedDataVersionTag()`, which returns an integer
representing the version tag for `cachedData` for the current V8
version & flags.
PR-URL: https://github.com/nodejs/node/pull/11515
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'doc/api/v8.md')
-rw-r--r-- | doc/api/v8.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/api/v8.md b/doc/api/v8.md index be222bbabf..173d0abeef 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -9,6 +9,16 @@ const v8 = require('v8'); *Note*: The APIs and implementation are subject to change at any time. +## v8.cachedDataVersionTag() +<!-- YAML +added: REPLACEME +--> + +Returns an integer representing a "version tag" derived from the V8 version, +command line flags and detected CPU features. This is useful for determining +whether a [`vm.Script`][] `cachedData` buffer is compatible with this instance +of V8. + ## v8.getHeapSpaceStatistics() <!-- YAML added: v6.0.0 @@ -144,5 +154,6 @@ setTimeout(function() { v8.setFlagsFromString('--notrace_gc'); }, 60e3); ``` [V8]: https://developers.google.com/v8/ +[`vm.Script`]: vm.html#vm_new_vm_script_code_options [here]: https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md [`GetHeapSpaceStatistics`]: https://v8docs.nodesource.com/node-5.0/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4 |