Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
src: register external references of node-report for snapshot
PR-URL: #39961
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
joyeecheung authored and BethGriggs committed Sep 21, 2021
1 parent bef78a2 commit 6fdf025
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/node_external_reference.h
Expand Up @@ -65,6 +65,7 @@ class ExternalReferenceRegistry {
V(performance) \
V(process_methods) \
V(process_object) \
V(report) \
V(task_queue) \
V(url) \
V(util) \
Expand Down
21 changes: 21 additions & 0 deletions src/node_report_module.cc
@@ -1,5 +1,6 @@
#include "env.h"
#include "node_errors.h"
#include "node_external_reference.h"
#include "node_internals.h"
#include "node_options.h"
#include "node_report.h"
Expand Down Expand Up @@ -196,6 +197,26 @@ static void Initialize(Local<Object> exports,
SetReportOnUncaughtException);
}

void RegisterExternalReferences(node::ExternalReferenceRegistry* registry) {
registry->Register(WriteReport);
registry->Register(GetReport);
registry->Register(GetCompact);
registry->Register(SetCompact);
registry->Register(GetDirectory);
registry->Register(SetDirectory);
registry->Register(GetFilename);
registry->Register(SetFilename);
registry->Register(GetSignal);
registry->Register(SetSignal);
registry->Register(ShouldReportOnFatalError);
registry->Register(SetReportOnFatalError);
registry->Register(ShouldReportOnSignal);
registry->Register(SetReportOnSignal);
registry->Register(ShouldReportOnUncaughtException);
registry->Register(SetReportOnUncaughtException);
}

} // namespace report

NODE_MODULE_CONTEXT_AWARE_INTERNAL(report, report::Initialize)
NODE_MODULE_EXTERNAL_REFERENCE(report, report::RegisterExternalReferences)

0 comments on commit 6fdf025

Please sign in to comment.