From 8cf442caf9838c1ec15566333e0c3fb7eadf4761 Mon Sep 17 00:00:00 2001 From: Paddy Byers Date: Wed, 21 Dec 2011 17:10:35 +0000 Subject: [PATCH] Move exitHandler to function --- src/node.cc | 4 ++++ src/node.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 19be6c26a01..5a359e19fc4 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2691,4 +2691,8 @@ void Dispose() { V8::Dispose(); } +void Isolate::setExitHandler(void (*exitHandler)()) { + this->exitHandler = exitHandler; +} + } // namespace node diff --git a/src/node.h b/src/node.h index cf43d01bd02..1a78884c8e0 100644 --- a/src/node.h +++ b/src/node.h @@ -135,6 +135,8 @@ class Isolate { NODE_EXTERN int Stop(int signum); NODE_EXTERN static Isolate* New(); NODE_EXTERN void Dispose(); + NODE_EXTERN void setExitHandler(void (*)()); + v8::Local ErrnoException(int errorno, const char *syscall = NULL, const char *msg = "", @@ -146,7 +148,6 @@ class Isolate { ext_statics statics_; int exit_status; int term_signal; - void (*exitHandler)(); Isolate(); ~Isolate(); @@ -245,6 +246,7 @@ class Isolate { v8::Persistent binding_cache; v8::Persistent module_load_list; + void (*exitHandler)(); };