src: remove unnecessary template parameter

The template class information is received via the type of the first
argument. So there is no need to use Wrap<T>(handle).

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
This commit is contained in:
Trevor Norris 2014-11-14 15:47:34 -08:00
parent 5962dbef49
commit add955e6b8
10 changed files with 12 additions and 12 deletions

View File

@ -72,7 +72,7 @@ inline void BaseObject::MakeWeak(Type* ptr) {
v8::HandleScope scope(env_->isolate());
v8::Local<v8::Object> handle = object();
assert(handle->InternalFieldCount() > 0);
Wrap<Type>(handle, ptr);
Wrap(handle, ptr);
handle_.MarkIndependent();
handle_.SetWeak<Type>(ptr, WeakCallback<Type>);
}

View File

@ -74,7 +74,7 @@ class GetAddrInfoReqWrap : public ReqWrap<uv_getaddrinfo_t> {
GetAddrInfoReqWrap::GetAddrInfoReqWrap(Environment* env,
Local<Object> req_wrap_obj)
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETADDRINFOREQWRAP) {
Wrap<GetAddrInfoReqWrap>(req_wrap_obj, this);
Wrap(req_wrap_obj, this);
}
@ -91,7 +91,7 @@ class GetNameInfoReqWrap : public ReqWrap<uv_getnameinfo_t> {
GetNameInfoReqWrap::GetNameInfoReqWrap(Environment* env,
Local<Object> req_wrap_obj)
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETNAMEINFOREQWRAP) {
Wrap<GetNameInfoReqWrap>(req_wrap_obj, this);
Wrap(req_wrap_obj, this);
}

View File

@ -96,7 +96,7 @@ HandleWrap::HandleWrap(Environment* env,
handle__(handle) {
handle__->data = this;
HandleScope scope(env->isolate());
Wrap<HandleWrap>(object, this);
Wrap(object, this);
QUEUE_INSERT_TAIL(env->handle_wrap_queue(), &handle_wrap_queue_);
}

View File

@ -205,7 +205,7 @@ class ContextifyContext {
if (wrapper.IsEmpty())
return scope.Escape(Local<Value>::New(env->isolate(), Handle<Value>()));
Wrap<ContextifyContext>(wrapper, this);
Wrap(wrapper, this);
return scope.Escape(wrapper);
}

View File

@ -79,7 +79,7 @@ class FSReqWrap: public ReqWrap<uv_fs_t> {
syscall_(syscall),
data_(data),
dest_len_(0) {
Wrap<FSReqWrap>(object(), this);
Wrap(object(), this);
}
void ReleaseEarly() {

View File

@ -60,7 +60,7 @@ class PipeConnectWrap : public ReqWrap<uv_connect_t> {
PipeConnectWrap::PipeConnectWrap(Environment* env, Local<Object> req_wrap_obj)
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_PIPEWRAP) {
Wrap<PipeConnectWrap>(req_wrap_obj, this);
Wrap(req_wrap_obj, this);
}

View File

@ -37,7 +37,7 @@ class ShutdownWrap : public ReqWrap<uv_shutdown_t> {
public:
ShutdownWrap(Environment* env, v8::Local<v8::Object> req_wrap_obj)
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_SHUTDOWNWRAP) {
Wrap<ShutdownWrap>(req_wrap_obj, this);
Wrap(req_wrap_obj, this);
}
static void NewShutdownWrap(const v8::FunctionCallbackInfo<v8::Value>& args) {
@ -52,7 +52,7 @@ class WriteWrap: public ReqWrap<uv_write_t> {
WriteWrap(Environment* env, v8::Local<v8::Object> obj, StreamWrap* wrap)
: ReqWrap(env, obj, AsyncWrap::PROVIDER_WRITEWRAP),
wrap_(wrap) {
Wrap<WriteWrap>(obj, this);
Wrap(obj, this);
}
void* operator new(size_t size, char* storage) { return storage; }

View File

@ -61,7 +61,7 @@ class TCPConnectWrap : public ReqWrap<uv_connect_t> {
TCPConnectWrap::TCPConnectWrap(Environment* env, Local<Object> req_wrap_obj)
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_TCPWRAP) {
Wrap<TCPConnectWrap>(req_wrap_obj, this);
Wrap(req_wrap_obj, this);
}

View File

@ -78,7 +78,7 @@ TLSCallbacks::TLSCallbacks(Environment* env,
error_(NULL),
cycle_depth_(0),
eof_(false) {
node::Wrap<TLSCallbacks>(object(), this);
node::Wrap(object(), this);
MakeWeak(this);
// Initialize queue for clearIn writes

View File

@ -64,7 +64,7 @@ SendWrap::SendWrap(Environment* env,
bool have_callback)
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_UDPWRAP),
have_callback_(have_callback) {
Wrap<SendWrap>(req_wrap_obj, this);
Wrap(req_wrap_obj, this);
}