aboutsummaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/node.h b/src/node.h
index 03cf155af1..417d1d8e35 100644
--- a/src/node.h
+++ b/src/node.h
@@ -193,7 +193,8 @@ inline void NODE_SET_METHOD(const TypeName& recv,
v8::FunctionCallback callback) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
- v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(callback);
+ v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate,
+ callback);
v8::Local<v8::Function> fn = t->GetFunction();
v8::Local<v8::String> fn_name = v8::String::NewFromUtf8(isolate, name);
fn->SetName(fn_name);
@@ -208,7 +209,8 @@ inline void NODE_SET_PROTOTYPE_METHOD(v8::Handle<v8::FunctionTemplate> recv,
v8::FunctionCallback callback) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
- v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(callback);
+ v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate,
+ callback);
recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name),
t->GetFunction());
}