We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f39064b commit 4cc95a5Copy full SHA for 4cc95a5
lib/internal/worker.js
@@ -71,9 +71,7 @@ const {
71
validateObject,
72
validateNumber,
73
} = require('internal/validators');
74
-const {
75
- normalizeHeapProfileOptions,
76
-} = require('internal/v8/heap_profile');
+let normalizeHeapProfileOptions;
77
const {
78
throwIfBuildingSnapshot,
79
} = require('internal/v8/startup_snapshot');
@@ -600,6 +598,8 @@ class Worker extends EventEmitter {
600
598
* @returns {Promise}
601
599
*/
602
startHeapProfile(options) {
+ normalizeHeapProfileOptions ??=
+ require('internal/v8/heap_profile').normalizeHeapProfileOptions;
603
const { sampleInterval, stackDepth, flags } =
604
normalizeHeapProfileOptions(options);
605
const startTaker = this[kHandle]?.startHeapProfile(
0 commit comments