From 70beef97bdf21b52632492c3b54b067a331ea068 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Thu, 23 Feb 2017 02:04:48 -0500 Subject: 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 Reviewed-By: Ben Noordhuis --- doc/api/v8.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/api/v8.md') 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() + + +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()