diff options
author | cjihrig <cjihrig@gmail.com> | 2019-03-01 18:00:51 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-03-03 19:26:04 -0500 |
commit | b271b0315a2ecec3cd1aae0c5556a31f5911dcec (patch) | |
tree | b9439f5a7a3203c270b98c91a97f19e233e7d8f2 /src/node_report_module.cc | |
parent | 4db423c0eea82ecb06ae386ced910f8de414a192 (diff) | |
download | node-new-b271b0315a2ecec3cd1aae0c5556a31f5911dcec.tar.gz |
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/node_report_module.cc')
-rw-r--r-- | src/node_report_module.cc | 13 |
1 files changed, 0 insertions, 13 deletions
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); } |