File tree 3 files changed +8
-11
lines changed
3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -693,7 +693,7 @@ class ContextifyScript : public BaseObject {
693
693
694
694
Local<Value> result;
695
695
if (timeout != -1 ) {
696
- Watchdog wd (env, timeout);
696
+ Watchdog wd (env-> isolate () , timeout);
697
697
result = script->Run ();
698
698
} else {
699
699
result = script->Run ();
Original file line number Diff line number Diff line change 1
1
#include " node_watchdog.h"
2
- #include " env.h"
3
- #include " env-inl.h"
4
2
#include " util.h"
3
+ #include " util-inl.h"
5
4
6
5
namespace node {
7
6
8
7
using v8::V8;
9
8
10
9
11
- Watchdog::Watchdog (Environment* env , uint64_t ms) : env_(env ),
12
- destroyed_ (false ) {
10
+ Watchdog::Watchdog (v8::Isolate* isolate , uint64_t ms) : isolate_(isolate ),
11
+ destroyed_ (false ) {
13
12
int rc;
14
13
loop_ = new uv_loop_t ;
15
14
CHECK (loop_);
@@ -84,7 +83,7 @@ void Watchdog::Async(uv_async_t* async) {
84
83
void Watchdog::Timer (uv_timer_t * timer) {
85
84
Watchdog* w = ContainerOf (&Watchdog::timer_, timer);
86
85
uv_stop (w->loop_ );
87
- V8::TerminateExecution (w->env ()-> isolate ());
86
+ V8::TerminateExecution (w->isolate ());
88
87
}
89
88
90
89
Original file line number Diff line number Diff line change 4
4
#include " v8.h"
5
5
#include " uv.h"
6
6
7
- #include " env.h"
8
-
9
7
namespace node {
10
8
11
9
class Watchdog {
12
10
public:
13
- explicit Watchdog (Environment* env , uint64_t ms);
11
+ explicit Watchdog (v8::Isolate* isolate , uint64_t ms);
14
12
~Watchdog ();
15
13
16
14
void Dispose ();
17
15
18
- inline Environment* env () const { return env_ ; }
16
+ v8::Isolate* isolate () { return isolate_ ; }
19
17
20
18
private:
21
19
void Destroy ();
@@ -24,7 +22,7 @@ class Watchdog {
24
22
static void Async (uv_async_t * async);
25
23
static void Timer (uv_timer_t * timer);
26
24
27
- Environment* env_ ;
25
+ v8::Isolate* isolate_ ;
28
26
uv_thread_t thread_;
29
27
uv_loop_t * loop_;
30
28
uv_async_t async_;
You can’t perform that action at this time.
0 commit comments