aboutsummaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node.h b/src/node.h
index ff55cf19e3..5ba5aa9c86 100644
--- a/src/node.h
+++ b/src/node.h
@@ -212,8 +212,9 @@ 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(isolate,
- callback);
+ v8::Handle<v8::Signature> s = v8::Signature::New(isolate, recv);
+ v8::Local<v8::FunctionTemplate> t =
+ v8::FunctionTemplate::New(isolate, callback, v8::Handle<v8::Value>(), s);
recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name),
t->GetFunction());
}