diff options
Diffstat (limited to 'lib/v8.js')
-rw-r--r-- | lib/v8.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/v8.js b/lib/v8.js index 56e3e605621..0442cce4083 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -37,6 +37,12 @@ const { Serializer: _Serializer, Deserializer: _Deserializer } = internalBinding('serdes'); + +let profiler = {}; +if (internalBinding('config').hasInspector) { + profiler = internalBinding('profiler'); +} + const assert = require('internal/assert'); const { copy } = internalBinding('buffer'); const { inspect } = require('internal/util/inspect'); @@ -275,6 +281,7 @@ module.exports = { DefaultSerializer, DefaultDeserializer, deserialize, + takeCoverage: profiler.takeCoverage, serialize, writeHeapSnapshot, }; |