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 5228af2 commit c9c9431Copy full SHA for c9c9431
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