diff --git a/lib/internal/process/report.js b/lib/internal/process/report.js index 5d314cdeff0783..daf948258c3172 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 bd6e7100416e9c..4617fb627155de 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 c9a3a28952ad86..31974f25104046 100644 --- a/src/node_report_module.cc +++ b/src/node_report_module.cc @@ -75,18 +75,6 @@ void GetReport(const FunctionCallbackInfo& info) { .ToLocalChecked()); } -// Signal handler for report action, called from JS land (util.js) -void OnUserSignal(const FunctionCallbackInfo& info) { - Environment* env = Environment::GetCurrent(info); - Isolate* isolate = env->isolate(); - CHECK(info[0]->IsString()); - Local str = info[0].As(); - String::Utf8Value value(isolate, str); - std::string filename; - TriggerNodeReport( - isolate, env, *value, __func__, filename, info[0].As()); -} - // 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 exports, std::shared_ptr 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); }