Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2014-02-21 17:02:42 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2014-02-22 03:20:56 +0400
commit75adde07f9a2de7f38a67bec72bd377d450bdb52 (patch)
treef93e9faebbe53c44c6806c9d52ae539a95fe58d5 /src/node_stat_watcher.cc
parente746bbdc2b79881b2c991c829b5437340583a064 (diff)
src: remove `node_isolate` from source
fix #6899
Diffstat (limited to 'src/node_stat_watcher.cc')
-rw-r--r--src/node_stat_watcher.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc
index fadce4557b8..5d72d7c244e 100644
--- a/src/node_stat_watcher.cc
+++ b/src/node_stat_watcher.cc
@@ -45,17 +45,17 @@ using v8::String;
using v8::Value;
-void StatWatcher::Initialize(Handle<Object> target) {
- HandleScope scope(node_isolate);
+void StatWatcher::Initialize(Environment* env, Handle<Object> target) {
+ HandleScope scope(env->isolate());
Local<FunctionTemplate> t = FunctionTemplate::New(StatWatcher::New);
t->InstanceTemplate()->SetInternalFieldCount(1);
- t->SetClassName(FIXED_ONE_BYTE_STRING(node_isolate, "StatWatcher"));
+ t->SetClassName(FIXED_ONE_BYTE_STRING(env->isolate(), "StatWatcher"));
NODE_SET_PROTOTYPE_METHOD(t, "start", StatWatcher::Start);
NODE_SET_PROTOTYPE_METHOD(t, "stop", StatWatcher::Stop);
- target->Set(FIXED_ONE_BYTE_STRING(node_isolate, "StatWatcher"),
+ target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "StatWatcher"),
t->GetFunction());
}
@@ -92,7 +92,7 @@ void StatWatcher::Callback(uv_fs_poll_t* handle,
Local<Value> argv[] = {
BuildStatsObject(env, curr),
BuildStatsObject(env, prev),
- Integer::New(status, node_isolate)
+ Integer::New(status, env->isolate())
};
wrap->MakeCallback(env->onchange_string(), ARRAY_SIZE(argv), argv);
}
@@ -108,7 +108,8 @@ void StatWatcher::New(const FunctionCallbackInfo<Value>& args) {
void StatWatcher::Start(const FunctionCallbackInfo<Value>& args) {
assert(args.Length() == 3);
- HandleScope scope(node_isolate);
+ Environment* env = Environment::GetCurrent(args.GetIsolate());
+ HandleScope scope(env->isolate());
StatWatcher* wrap = Unwrap<StatWatcher>(args.This());
String::Utf8Value path(args[0]);