summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/internal/process/report.js2
-rw-r--r--src/node_report.cc2
-rw-r--r--src/node_report_module.cc13
3 files changed, 2 insertions, 15 deletions
diff --git a/lib/internal/process/report.js b/lib/internal/process/report.js
index 5d314cdeff..daf948258c 100644
--- a/lib/internal/process/report.js
+++ b/lib/internal/process/report.js
@@ -104,7 +104,7 @@ const report = {
function handleSignal(signo) {
if (typeof signo !== 'string')
signo = config.signal;
- nr.onUserSignal(signo);
+ nr.triggerReport(signo, 'Signal', null, '');
}
module.exports = {
diff --git a/src/node_report.cc b/src/node_report.cc
index bd6e710041..4617fb6271 100644
--- a/src/node_report.cc
+++ b/src/node_report.cc
@@ -377,7 +377,7 @@ static void PrintJavaScriptStack(JSONWriter* writer,
std::string ss;
if ((!strcmp(location, "OnFatalError")) ||
- (!strcmp(location, "OnUserSignal"))) {
+ (!strcmp(location, "Signal"))) {
ss = "No stack.\nUnavailable.\n";
} else {
String::Utf8Value sv(isolate, stackstr);
diff --git a/src/node_report_module.cc b/src/node_report_module.cc
index c9a3a28952..31974f2510 100644
--- a/src/node_report_module.cc
+++ b/src/node_report_module.cc
@@ -75,18 +75,6 @@ void GetReport(const FunctionCallbackInfo<Value>& info) {
.ToLocalChecked());
}
-// Signal handler for report action, called from JS land (util.js)
-void OnUserSignal(const FunctionCallbackInfo<Value>& info) {
- Environment* env = Environment::GetCurrent(info);
- Isolate* isolate = env->isolate();
- CHECK(info[0]->IsString());
- Local<String> str = info[0].As<String>();
- String::Utf8Value value(isolate, str);
- std::string filename;
- TriggerNodeReport(
- isolate, env, *value, __func__, filename, info[0].As<String>());
-}
-
// A method to sync up data elements in the JS land with its
// corresponding elements in the C++ world. Required because
// (i) the tunables are first intercepted through the CLI but
@@ -219,7 +207,6 @@ static void Initialize(Local<Object> exports,
std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options();
env->SetMethod(exports, "triggerReport", TriggerReport);
env->SetMethod(exports, "getReport", GetReport);
- env->SetMethod(exports, "onUserSignal", OnUserSignal);
env->SetMethod(exports, "syncConfig", SyncConfig);
}