@@ -612,6 +612,21 @@ added: v10.5.0
612
612
The ` 'online' ` event is emitted when the worker thread has started executing
613
613
JavaScript code.
614
614
615
+ ### ` worker.getHeapSnapshot() `
616
+ <!-- YAML
617
+ added: REPLACEME
618
+ -->
619
+
620
+ * Returns: {Promise} A promise for a Readable Stream containing
621
+ a V8 heap snapshot
622
+
623
+ Returns a readable stream for a V8 snapshot of the current state of the Worker.
624
+ See [ ` v8.getHeapSnapshot() ` ] [ ] for more details.
625
+
626
+ If the Worker thread is no longer running, which may occur before the
627
+ [ ` 'exit' ` event] [ ] is emitted, the returned ` Promise ` will be rejected
628
+ immediately with an [ ` ERR_WORKER_NOT_RUNNING ` ] [ ] error.
629
+
615
630
### ` worker.postMessage(value[, transferList]) `
616
631
<!-- YAML
617
632
added: v10.5.0
@@ -684,21 +699,6 @@ inside the worker thread. If `stdout: true` was not passed to the
684
699
[ ` Worker ` ] [ ] constructor, then data will be piped to the parent thread's
685
700
[ ` process.stdout ` ] [ ] stream.
686
701
687
- ### ` worker.takeHeapSnapshot() `
688
- <!-- YAML
689
- added: REPLACEME
690
- -->
691
-
692
- * Returns: {Promise} A promise for a Readable Stream containing
693
- a V8 heap snapshot
694
-
695
- Returns a readable stream for a V8 snapshot of the current state of the Worker.
696
- See [ ` v8.getHeapSnapshot() ` ] [ ] for more details.
697
-
698
- If the Worker thread is no longer running, which may occur before the
699
- [ ` 'exit' ` event] [ ] is emitted, the returned ` Promise ` will be rejected
700
- immediately with an [ ` ERR_WORKER_NOT_RUNNING ` ] [ ] error.
701
-
702
702
### ` worker.terminate() `
703
703
<!-- YAML
704
704
added: v10.5.0
0 commit comments