diff options
author | Fedor Indutny <fedor@indutny.com> | 2014-06-12 11:21:26 -0700 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-06-12 18:30:26 -0700 |
commit | d5198768de26077a523ecaf7182dfbe94c5fa5ca (patch) | |
tree | 543cfa3ecf706058d83782145b8f07e734cf0c28 /src/node_watchdog.cc | |
parent | d78a3787d26488c0848509b84b09c3fd30185f58 (diff) | |
download | node-new-d5198768de26077a523ecaf7182dfbe94c5fa5ca.tar.gz |
watchdog: terminate one specific isolate
Diffstat (limited to 'src/node_watchdog.cc')
-rw-r--r-- | src/node_watchdog.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index afa2a7b511..a71a906d70 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -20,6 +20,8 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. #include "node_watchdog.h" +#include "env.h" +#include "env-inl.h" #include "util.h" #include <assert.h> @@ -28,7 +30,8 @@ namespace node { using v8::V8; -Watchdog::Watchdog(uint64_t ms) : destroyed_(false) { +Watchdog::Watchdog(Environment* env, uint64_t ms) : env_(env), + destroyed_(false) { int rc; loop_ = new uv_loop_t; CHECK(loop_); @@ -98,7 +101,8 @@ void Watchdog::Async(uv_async_t* async) { void Watchdog::Timer(uv_timer_t* timer) { - V8::TerminateExecution(); + Watchdog* w = ContainerOf(&Watchdog::timer_, timer); + V8::TerminateExecution(w->env()->isolate()); } |