diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2014-02-21 17:02:42 +0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-02-22 03:20:56 +0400 |
commit | 75adde07f9a2de7f38a67bec72bd377d450bdb52 (patch) | |
tree | f93e9faebbe53c44c6806c9d52ae539a95fe58d5 /src/signal_wrap.cc | |
parent | e746bbdc2b79881b2c991c829b5437340583a064 (diff) |
src: remove `node_isolate` from source
fix #6899
Diffstat (limited to 'src/signal_wrap.cc')
-rw-r--r-- | src/signal_wrap.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index dbf4b949e64..0e61ba63ea6 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -46,9 +46,10 @@ class SignalWrap : public HandleWrap { static void Initialize(Handle<Object> target, Handle<Value> unused, Handle<Context> context) { + Environment* env = Environment::GetCurrent(context); Local<FunctionTemplate> constructor = FunctionTemplate::New(New); constructor->InstanceTemplate()->SetInternalFieldCount(1); - constructor->SetClassName(FIXED_ONE_BYTE_STRING(node_isolate, "Signal")); + constructor->SetClassName(FIXED_ONE_BYTE_STRING(env->isolate(), "Signal")); NODE_SET_PROTOTYPE_METHOD(constructor, "close", HandleWrap::Close); NODE_SET_PROTOTYPE_METHOD(constructor, "ref", HandleWrap::Ref); @@ -56,7 +57,7 @@ class SignalWrap : public HandleWrap { NODE_SET_PROTOTYPE_METHOD(constructor, "start", Start); NODE_SET_PROTOTYPE_METHOD(constructor, "stop", Stop); - target->Set(FIXED_ONE_BYTE_STRING(node_isolate, "Signal"), + target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "Signal"), constructor->GetFunction()); } @@ -84,7 +85,8 @@ class SignalWrap : public HandleWrap { } static void Start(const FunctionCallbackInfo<Value>& args) { - HandleScope scope(node_isolate); + Environment* env = Environment::GetCurrent(args.GetIsolate()); + HandleScope scope(env->isolate()); SignalWrap* wrap = Unwrap<SignalWrap>(args.This()); int signum = args[0]->Int32Value(); @@ -93,7 +95,8 @@ class SignalWrap : public HandleWrap { } static void Stop(const FunctionCallbackInfo<Value>& args) { - HandleScope scope(node_isolate); + Environment* env = Environment::GetCurrent(args.GetIsolate()); + HandleScope scope(env->isolate()); SignalWrap* wrap = Unwrap<SignalWrap>(args.This()); int err = uv_signal_stop(&wrap->handle_); |