summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-03-01 18:00:51 -0500
committercjihrig <cjihrig@gmail.com>2019-03-03 19:26:04 -0500
commitb271b0315a2ecec3cd1aae0c5556a31f5911dcec (patch)
treeb9439f5a7a3203c270b98c91a97f19e233e7d8f2 /src
parent4db423c0eea82ecb06ae386ced910f8de414a192 (diff)
downloadandroid-node-v8-b271b0315a2ecec3cd1aae0c5556a31f5911dcec.tar.gz
android-node-v8-b271b0315a2ecec3cd1aae0c5556a31f5911dcec.tar.bz2
android-node-v8-b271b0315a2ecec3cd1aae0c5556a31f5911dcec.zip
report: use triggerReport() to handle signals
This commit uses the triggerReport() binding to handle signals and removes the custom onUserSignal() function. PR-URL: https://github.com/nodejs/node/pull/26386 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_report.cc2
-rw-r--r--src/node_report_module.cc13
2 files changed, 1 insertions, 14 deletions
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);
}