Skip to content

Commit

Permalink
src: register external references of node-report for snapshot
Browse files Browse the repository at this point in the history
PR-URL: #39961
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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.