Skip to content

Commit add955e

Browse files
committed
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: nodejs/node-v0.x-archive#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>
1 parent 5962dbe commit add955e

10 files changed

Lines changed: 12 additions & 12 deletions

src/base-object-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ inline void BaseObject::MakeWeak(Type* ptr) {
7272
v8::HandleScope scope(env_->isolate());
7373
v8::Local<v8::Object> handle = object();
7474
assert(handle->InternalFieldCount() > 0);
75-
Wrap<Type>(handle, ptr);
75+
Wrap(handle, ptr);
7676
handle_.MarkIndependent();
7777
handle_.SetWeak<Type>(ptr, WeakCallback<Type>);
7878
}

src/cares_wrap.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class GetAddrInfoReqWrap : public ReqWrap<uv_getaddrinfo_t> {
7474
GetAddrInfoReqWrap::GetAddrInfoReqWrap(Environment* env,
7575
Local<Object> req_wrap_obj)
7676
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETADDRINFOREQWRAP) {
77-
Wrap<GetAddrInfoReqWrap>(req_wrap_obj, this);
77+
Wrap(req_wrap_obj, this);
7878
}
7979

8080

@@ -91,7 +91,7 @@ class GetNameInfoReqWrap : public ReqWrap<uv_getnameinfo_t> {
9191
GetNameInfoReqWrap::GetNameInfoReqWrap(Environment* env,
9292
Local<Object> req_wrap_obj)
9393
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETNAMEINFOREQWRAP) {
94-
Wrap<GetNameInfoReqWrap>(req_wrap_obj, this);
94+
Wrap(req_wrap_obj, this);
9595
}
9696

9797

src/handle_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ HandleWrap::HandleWrap(Environment* env,
9696
handle__(handle) {
9797
handle__->data = this;
9898
HandleScope scope(env->isolate());
99-
Wrap<HandleWrap>(object, this);
99+
Wrap(object, this);
100100
QUEUE_INSERT_TAIL(env->handle_wrap_queue(), &handle_wrap_queue_);
101101
}
102102

src/node_contextify.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class ContextifyContext {
205205
if (wrapper.IsEmpty())
206206
return scope.Escape(Local<Value>::New(env->isolate(), Handle<Value>()));
207207

208-
Wrap<ContextifyContext>(wrapper, this);
208+
Wrap(wrapper, this);
209209
return scope.Escape(wrapper);
210210
}
211211

src/node_file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FSReqWrap: public ReqWrap<uv_fs_t> {
7979
syscall_(syscall),
8080
data_(data),
8181
dest_len_(0) {
82-
Wrap<FSReqWrap>(object(), this);
82+
Wrap(object(), this);
8383
}
8484

8585
void ReleaseEarly() {

src/pipe_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class PipeConnectWrap : public ReqWrap<uv_connect_t> {
6060

6161
PipeConnectWrap::PipeConnectWrap(Environment* env, Local<Object> req_wrap_obj)
6262
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_PIPEWRAP) {
63-
Wrap<PipeConnectWrap>(req_wrap_obj, this);
63+
Wrap(req_wrap_obj, this);
6464
}
6565

6666

src/stream_wrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ShutdownWrap : public ReqWrap<uv_shutdown_t> {
3737
public:
3838
ShutdownWrap(Environment* env, v8::Local<v8::Object> req_wrap_obj)
3939
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_SHUTDOWNWRAP) {
40-
Wrap<ShutdownWrap>(req_wrap_obj, this);
40+
Wrap(req_wrap_obj, this);
4141
}
4242

4343
static void NewShutdownWrap(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -52,7 +52,7 @@ class WriteWrap: public ReqWrap<uv_write_t> {
5252
WriteWrap(Environment* env, v8::Local<v8::Object> obj, StreamWrap* wrap)
5353
: ReqWrap(env, obj, AsyncWrap::PROVIDER_WRITEWRAP),
5454
wrap_(wrap) {
55-
Wrap<WriteWrap>(obj, this);
55+
Wrap(obj, this);
5656
}
5757

5858
void* operator new(size_t size, char* storage) { return storage; }

src/tcp_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TCPConnectWrap : public ReqWrap<uv_connect_t> {
6161

6262
TCPConnectWrap::TCPConnectWrap(Environment* env, Local<Object> req_wrap_obj)
6363
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_TCPWRAP) {
64-
Wrap<TCPConnectWrap>(req_wrap_obj, this);
64+
Wrap(req_wrap_obj, this);
6565
}
6666

6767

src/tls_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ TLSCallbacks::TLSCallbacks(Environment* env,
7878
error_(NULL),
7979
cycle_depth_(0),
8080
eof_(false) {
81-
node::Wrap<TLSCallbacks>(object(), this);
81+
node::Wrap(object(), this);
8282
MakeWeak(this);
8383

8484
// Initialize queue for clearIn writes

src/udp_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ SendWrap::SendWrap(Environment* env,
6464
bool have_callback)
6565
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_UDPWRAP),
6666
have_callback_(have_callback) {
67-
Wrap<SendWrap>(req_wrap_obj, this);
67+
Wrap(req_wrap_obj, this);
6868
}
6969

7070

0 commit comments

Comments
 (0)