Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2021-02-08 18:19:37 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2021-02-19 14:08:07 +0300
commit445108dc30968ae2adc1d027fb7c57db4d7b8372 (patch)
treec594cdff5b57a5f589937751b56f037ef50f4fc8 /src/heap_utils.cc
parent8aa9b772f4892ab44e74d3e7df0733408b7d2bc8 (diff)
bootstrap: include v8 module into the builtin snapshot
PR-URL: https://github.com/nodejs/node/pull/36943 Fixes: https://github.com/nodejs/node/issues/35930 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/heap_utils.cc')
-rw-r--r--src/heap_utils.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/heap_utils.cc b/src/heap_utils.cc
index c0c9ac2bdc7..bc779489637 100644
--- a/src/heap_utils.cc
+++ b/src/heap_utils.cc
@@ -1,6 +1,7 @@
#include "diagnosticfilename-inl.h"
#include "env-inl.h"
#include "memory_tracker-inl.h"
+#include "node_external_reference.h"
#include "stream_base-inl.h"
#include "util-inl.h"
@@ -399,7 +400,15 @@ void Initialize(Local<Object> target,
env->SetMethod(target, "createHeapSnapshotStream", CreateHeapSnapshotStream);
}
+void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
+ registry->Register(BuildEmbedderGraph);
+ registry->Register(TriggerHeapSnapshot);
+ registry->Register(CreateHeapSnapshotStream);
+}
+
} // namespace heap
} // namespace node
NODE_MODULE_CONTEXT_AWARE_INTERNAL(heap_utils, node::heap::Initialize)
+NODE_MODULE_EXTERNAL_REFERENCE(heap_utils,
+ node::heap::RegisterExternalReferences)