Skip to content

Commit

Permalink
src: remove unnecessary template parameter
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Fedor Indutny <[email protected]>
Reviewed-by: Alexis Campailla <[email protected]>
Reviewed-by: Julien Gilli <[email protected]>
  • Loading branch information
trevnorris authored and piscisaureus committed Dec 9, 2014
1 parent b82598b commit b03106e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/base-object-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ inline void BaseObject::MakeWeak(Type* ptr) {
v8::HandleScope scope(env_->isolate());
v8::Local<v8::Object> handle = object();
CHECK_GT(handle->InternalFieldCount(), 0);
Wrap<Type>(handle, ptr);
Wrap(handle, ptr);
handle_.MarkIndependent();
handle_.SetWeak<Type>(ptr, WeakCallback<Type>);
}
Expand Down
4 changes: 2 additions & 2 deletions src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,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);
}


Expand All @@ -90,7 +90,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);
}


Expand Down
2 changes: 1 addition & 1 deletion src/handle_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,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_);
}

Expand Down
2 changes: 1 addition & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class FSReqWrap: public ReqWrap<uv_fs_t> {
syscall_(syscall),
data_(data),
dest_len_(0) {
Wrap<FSReqWrap>(object(), this);
Wrap(object(), this);
}

void ReleaseEarly() {
Expand Down
2 changes: 1 addition & 1 deletion src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
4 changes: 2 additions & 2 deletions src/stream_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion src/tcp_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down
2 changes: 1 addition & 1 deletion src/tls_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ TLSCallbacks::TLSCallbacks(Environment* env,
error_(nullptr),
cycle_depth_(0),
eof_(false) {
node::Wrap<TLSCallbacks>(object(), this);
node::Wrap(object(), this);
MakeWeak(this);

// Initialize queue for clearIn writes
Expand Down
2 changes: 1 addition & 1 deletion src/udp_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit b03106e

Please sign in to comment.