mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
Signed-off-by: Max H Fisher <mfisher187@bloomberg.net> PR-URL: https://github.com/nodejs/node/pull/64684 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
19 lines
436 B
C++
19 lines
436 B
C++
#include <node.h>
|
|
#include <v8.h>
|
|
#include <cstdio>
|
|
|
|
namespace {
|
|
void TestAbortHandler(const char* /*location*/, const char* /*message*/) {
|
|
fputs("CUSTOM_ABORT_HANDLER_RAN\n", stderr);
|
|
fflush(stderr);
|
|
}
|
|
|
|
void InstallAbortHandler(const v8::FunctionCallbackInfo<v8::Value>&) {
|
|
node::SetAbortHandler(TestAbortHandler);
|
|
}
|
|
} // namespace
|
|
|
|
NODE_MODULE_INIT() {
|
|
NODE_SET_METHOD(exports, "installAbortHandler", InstallAbortHandler);
|
|
}
|