diff --git a/src/node.h b/src/node.h index 329a3c623b..65f6852a48 100644 --- a/src/node.h +++ b/src/node.h @@ -293,7 +293,7 @@ inline void NODE_SET_PROTOTYPE_METHOD(v8::Local recv, v8::FunctionTemplate::New(isolate, callback, v8::Local(), s); v8::Local fn_name = v8::String::NewFromUtf8(isolate, name); t->SetClassName(fn_name); - recv->PrototypeTemplate()->Set(v8::String::NewFromUtf8(isolate, name), t); + recv->PrototypeTemplate()->Set(fn_name, t); } #define NODE_SET_PROTOTYPE_METHOD node::NODE_SET_PROTOTYPE_METHOD