@@ -1782,7 +1782,7 @@ void Connection::SSLInfoCallback(const SSL *ssl_, int where, int ret) {
17821782void Connection::EncIn (const FunctionCallbackInfo<Value>& args) {
17831783 HandleScope scope (node_isolate);
17841784
1785- Connection* conn = Connection::Unwrap (args.This ());
1785+ Connection* conn = UnwrapObject< Connection> (args.This ());
17861786
17871787 if (args.Length () < 3 ) {
17881788 return ThrowTypeError (" Takes 3 parameters" );
@@ -1832,7 +1832,7 @@ void Connection::EncIn(const FunctionCallbackInfo<Value>& args) {
18321832void Connection::ClearOut (const FunctionCallbackInfo<Value>& args) {
18331833 HandleScope scope (node_isolate);
18341834
1835- Connection* conn = Connection::Unwrap (args.This ());
1835+ Connection* conn = UnwrapObject< Connection> (args.This ());
18361836
18371837 if (args.Length () < 3 ) {
18381838 return ThrowTypeError (" Takes 3 parameters" );
@@ -1886,15 +1886,15 @@ void Connection::ClearOut(const FunctionCallbackInfo<Value>& args) {
18861886
18871887void Connection::ClearPending (const FunctionCallbackInfo<Value>& args) {
18881888 HandleScope scope (node_isolate);
1889- Connection* conn = Connection::Unwrap (args.This ());
1889+ Connection* conn = UnwrapObject< Connection> (args.This ());
18901890 int bytes_pending = BIO_pending (conn->bio_read_ );
18911891 args.GetReturnValue ().Set (bytes_pending);
18921892}
18931893
18941894
18951895void Connection::EncPending (const FunctionCallbackInfo<Value>& args) {
18961896 HandleScope scope (node_isolate);
1897- Connection* conn = Connection::Unwrap (args.This ());
1897+ Connection* conn = UnwrapObject< Connection> (args.This ());
18981898 int bytes_pending = BIO_pending (conn->bio_write_ );
18991899 args.GetReturnValue ().Set (bytes_pending);
19001900}
@@ -1903,7 +1903,7 @@ void Connection::EncPending(const FunctionCallbackInfo<Value>& args) {
19031903void Connection::EncOut (const FunctionCallbackInfo<Value>& args) {
19041904 HandleScope scope (node_isolate);
19051905
1906- Connection* conn = Connection::Unwrap (args.This ());
1906+ Connection* conn = UnwrapObject< Connection> (args.This ());
19071907
19081908 if (args.Length () < 3 ) {
19091909 return ThrowTypeError (" Takes 3 parameters" );
@@ -1934,7 +1934,7 @@ void Connection::EncOut(const FunctionCallbackInfo<Value>& args) {
19341934void Connection::ClearIn (const FunctionCallbackInfo<Value>& args) {
19351935 HandleScope scope (node_isolate);
19361936
1937- Connection* conn = Connection::Unwrap (args.This ());
1937+ Connection* conn = UnwrapObject< Connection> (args.This ());
19381938
19391939 if (args.Length () < 3 ) {
19401940 return ThrowTypeError (" Takes 3 parameters" );
@@ -1989,7 +1989,7 @@ void Connection::ClearIn(const FunctionCallbackInfo<Value>& args) {
19891989void Connection::Start (const FunctionCallbackInfo<Value>& args) {
19901990 HandleScope scope (node_isolate);
19911991
1992- Connection* conn = Connection::Unwrap (args.This ());
1992+ Connection* conn = UnwrapObject< Connection> (args.This ());
19931993
19941994 int rv = 0 ;
19951995 if (!SSL_is_init_finished (conn->ssl_ )) {
@@ -2014,7 +2014,7 @@ void Connection::Start(const FunctionCallbackInfo<Value>& args) {
20142014void Connection::Shutdown (const FunctionCallbackInfo<Value>& args) {
20152015 HandleScope scope (node_isolate);
20162016
2017- Connection* conn = Connection::Unwrap (args.This ());
2017+ Connection* conn = UnwrapObject< Connection> (args.This ());
20182018
20192019 if (conn->ssl_ == NULL ) {
20202020 return args.GetReturnValue ().Set (false );
@@ -2030,7 +2030,7 @@ void Connection::Shutdown(const FunctionCallbackInfo<Value>& args) {
20302030void Connection::Close (const FunctionCallbackInfo<Value>& args) {
20312031 HandleScope scope (node_isolate);
20322032
2033- Connection* conn = Connection::Unwrap (args.This ());
2033+ Connection* conn = UnwrapObject< Connection> (args.This ());
20342034
20352035 if (conn->ssl_ != NULL ) {
20362036 SSL_free (conn->ssl_ );
@@ -2043,7 +2043,7 @@ void Connection::Close(const FunctionCallbackInfo<Value>& args) {
20432043void Connection::GetServername (const FunctionCallbackInfo<Value>& args) {
20442044 HandleScope scope (node_isolate);
20452045
2046- Connection* conn = Connection::Unwrap (args.This ());
2046+ Connection* conn = UnwrapObject< Connection> (args.This ());
20472047
20482048 if (conn->is_server () && !conn->servername_ .IsEmpty ()) {
20492049 args.GetReturnValue ().Set (conn->servername_ );
@@ -2056,7 +2056,7 @@ void Connection::GetServername(const FunctionCallbackInfo<Value>& args) {
20562056void Connection::SetSNICallback (const FunctionCallbackInfo<Value>& args) {
20572057 HandleScope scope (node_isolate);
20582058
2059- Connection* conn = Connection::Unwrap (args.This ());
2059+ Connection* conn = UnwrapObject< Connection> (args.This ());
20602060
20612061 if (args.Length () < 1 || !args[0 ]->IsFunction ()) {
20622062 return ThrowError (" Must give a Function as first argument" );
0 commit comments