diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-07-28 04:33:04 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-07-28 04:33:06 +0400 |
commit | bca6e35b2b533ce220376d5db43893e14bb8dbf3 (patch) | |
tree | 432ae77cee505f23ae7556fbeead4b87d02402ae /src | |
parent | 497fe79f9759ff83161ff0620c47a6bdb7a205fe (diff) |
Don't always enable debug on startup
Improves startup time. Problem introduced in
4ab5476e89266194d82215214a1a870c9b79e295
Diffstat (limited to 'src')
-rw-r--r-- | src/node.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/node.cc b/src/node.cc index ed31a71240c..295b491dce5 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2343,13 +2343,6 @@ static void EnableDebug(bool wait_connect) { static volatile bool hit_signal; -static void EnableDebugSignalHandler(int signal) { - // This is signal safe. - hit_signal = true; - v8::Debug::DebugBreak(); -} - - static void DebugSignalCB(const Debug::EventDetails& details) { if (hit_signal && details.GetEvent() == v8::Break) { hit_signal = false; @@ -2359,6 +2352,14 @@ static void DebugSignalCB(const Debug::EventDetails& details) { } +static void EnableDebugSignalHandler(int signal) { + // This is signal safe. + hit_signal = true; + v8::Debug::SetDebugEventListener2(DebugSignalCB); + v8::Debug::DebugBreak(); +} + + #ifdef __POSIX__ static int RegisterSignalHandler(int signal, void (*handler)(int)) { @@ -2480,7 +2481,6 @@ char** Init(int argc, char *argv[]) { } else { #ifdef __POSIX__ RegisterSignalHandler(SIGUSR1, EnableDebugSignalHandler); - Debug::SetDebugEventListener2(DebugSignalCB); #endif // __POSIX__ } |