Skip to content

Commit

Permalink
Add 0.7-compatible GetLoop() and HAVE_ISOLATES
Browse files Browse the repository at this point in the history
  • Loading branch information
paddybyers committed Jan 26, 2012
1 parent df2bfed commit 3721e95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/node.cc
Expand Up @@ -2566,10 +2566,14 @@ int Isolate::Start(uv_thread_shared_t *hnd) {

return exit_status;
}

uv_loop_t *Isolate::Loop() {
return loop_;
}

uv_loop_t *Isolate::GetLoop() {
return loop_;
}

Isolate::Isolate() {
check_tick_watcher.data = this;
Expand Down
3 changes: 3 additions & 0 deletions src/node.h
Expand Up @@ -94,6 +94,8 @@
#define NODE_STRINGIFY_HELPER(n) #n
#endif

#define HAVE_ISOLATES

#ifdef NODE_LIBRARY
# define EXIT(X) node::Isolate *i = node::Isolate::GetCurrent(); if(!i->exit_status) i->exit_status = (X)
# define RETURN_ON_EXIT(X) if(exit_status) { if(exitHandler) exitHandler(); return X; }
Expand Down Expand Up @@ -145,6 +147,7 @@ class Isolate {
void __SetErrno(uv_err_t err);
v8::Persistent<v8::Object> local_env;
NODE_EXTERN uv_loop_t *Loop();
NODE_EXTERN uv_loop_t *GetLoop();
ext_statics statics_;
int exit_status;
int term_signal;
Expand Down

0 comments on commit 3721e95

Please sign in to comment.