@@ -886,7 +886,8 @@ void SSLWrap<Base>::GetPeerCertificate(
886886 const FunctionCallbackInfo<Value>& args) {
887887 HandleScope scope (node_isolate);
888888
889- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
889+ Base* w = NULL ;
890+ NODE_UNWRAP (args.This (), Base, w);
890891 Environment* env = w->env ();
891892
892893 Local<Object> info = Object::New ();
@@ -1020,7 +1021,8 @@ template <class Base>
10201021void SSLWrap<Base>::GetSession(const FunctionCallbackInfo<Value>& args) {
10211022 HandleScope scope (node_isolate);
10221023
1023- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1024+ Base* w = NULL ;
1025+ NODE_UNWRAP (args.This (), Base, w);
10241026
10251027 SSL_SESSION* sess = SSL_get_session (w->ssl_ );
10261028 if (sess == NULL )
@@ -1041,7 +1043,8 @@ template <class Base>
10411043void SSLWrap<Base>::SetSession(const FunctionCallbackInfo<Value>& args) {
10421044 HandleScope scope (node_isolate);
10431045
1044- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1046+ Base* w = NULL ;
1047+ NODE_UNWRAP (args.This (), Base, w);
10451048
10461049 if (args.Length () < 1 ||
10471050 (!args[0 ]->IsString () && !Buffer::HasInstance (args[0 ]))) {
@@ -1079,7 +1082,8 @@ template <class Base>
10791082void SSLWrap<Base>::LoadSession(const FunctionCallbackInfo<Value>& args) {
10801083 HandleScope scope (node_isolate);
10811084
1082- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1085+ Base* w = NULL ;
1086+ NODE_UNWRAP (args.This (), Base, w);
10831087 Environment* env = w->env ();
10841088
10851089 if (args.Length () >= 1 && Buffer::HasInstance (args[0 ])) {
@@ -1111,7 +1115,8 @@ void SSLWrap<Base>::LoadSession(const FunctionCallbackInfo<Value>& args) {
11111115template <class Base >
11121116void SSLWrap<Base>::IsSessionReused(const FunctionCallbackInfo<Value>& args) {
11131117 HandleScope scope (node_isolate);
1114- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1118+ Base* w = NULL ;
1119+ NODE_UNWRAP (args.This (), Base, w);
11151120 bool yes = SSL_session_reused (w->ssl_ );
11161121 args.GetReturnValue ().Set (yes);
11171122}
@@ -1120,7 +1125,8 @@ void SSLWrap<Base>::IsSessionReused(const FunctionCallbackInfo<Value>& args) {
11201125template <class Base >
11211126void SSLWrap<Base>::ReceivedShutdown(const FunctionCallbackInfo<Value>& args) {
11221127 HandleScope scope (node_isolate);
1123- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1128+ Base* w = NULL ;
1129+ NODE_UNWRAP (args.This (), Base, w);
11241130 bool yes = SSL_get_shutdown (w->ssl_ ) == SSL_RECEIVED_SHUTDOWN;
11251131 args.GetReturnValue ().Set (yes);
11261132}
@@ -1129,9 +1135,8 @@ void SSLWrap<Base>::ReceivedShutdown(const FunctionCallbackInfo<Value>& args) {
11291135template <class Base >
11301136void SSLWrap<Base>::EndParser(const FunctionCallbackInfo<Value>& args) {
11311137 HandleScope scope (node_isolate);
1132-
1133- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1134-
1138+ Base* w = NULL ;
1139+ NODE_UNWRAP (args.This (), Base, w);
11351140 w->hello_parser_ .End ();
11361141}
11371142
@@ -1140,7 +1145,8 @@ template <class Base>
11401145void SSLWrap<Base>::Renegotiate(const FunctionCallbackInfo<Value>& args) {
11411146 HandleScope scope (node_isolate);
11421147
1143- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1148+ Base* w = NULL ;
1149+ NODE_UNWRAP (args.This (), Base, w);
11441150
11451151 ClearErrorOnReturn clear_error_on_return;
11461152 (void ) &clear_error_on_return; // Silence unused variable warning.
@@ -1153,7 +1159,8 @@ void SSLWrap<Base>::Renegotiate(const FunctionCallbackInfo<Value>& args) {
11531159template <class Base >
11541160void SSLWrap<Base>::IsInitFinished(const FunctionCallbackInfo<Value>& args) {
11551161 HandleScope scope (node_isolate);
1156- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1162+ Base* w = NULL ;
1163+ NODE_UNWRAP (args.This (), Base, w);
11571164 bool yes = SSL_is_init_finished (w->ssl_ );
11581165 args.GetReturnValue ().Set (yes);
11591166}
@@ -1164,7 +1171,8 @@ template <class Base>
11641171void SSLWrap<Base>::VerifyError(const FunctionCallbackInfo<Value>& args) {
11651172 HandleScope scope (node_isolate);
11661173
1167- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1174+ Base* w = NULL ;
1175+ NODE_UNWRAP (args.This (), Base, w);
11681176
11691177 // XXX(indutny) Do this check in JS land?
11701178 X509* peer_cert = SSL_get_peer_certificate (w->ssl_ );
@@ -1230,7 +1238,8 @@ template <class Base>
12301238void SSLWrap<Base>::GetCurrentCipher(const FunctionCallbackInfo<Value>& args) {
12311239 HandleScope scope (node_isolate);
12321240
1233- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1241+ Base* w = NULL ;
1242+ NODE_UNWRAP (args.This (), Base, w);
12341243 Environment* env = w->env ();
12351244
12361245 OPENSSL_CONST SSL_CIPHER* c = SSL_get_current_cipher (w->ssl_ );
@@ -1325,7 +1334,8 @@ void SSLWrap<Base>::GetNegotiatedProto(
13251334 const FunctionCallbackInfo<Value>& args) {
13261335 HandleScope scope (node_isolate);
13271336
1328- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1337+ Base* w = NULL ;
1338+ NODE_UNWRAP (args.This (), Base, w);
13291339
13301340 if (w->is_client ()) {
13311341 if (w->selected_npn_proto_ .IsEmpty () == false ) {
@@ -1351,7 +1361,8 @@ template <class Base>
13511361void SSLWrap<Base>::SetNPNProtocols(const FunctionCallbackInfo<Value>& args) {
13521362 HandleScope scope (node_isolate);
13531363
1354- Base* w = ObjectWrap::Unwrap<Base>(args.This ());
1364+ Base* w = NULL ;
1365+ NODE_UNWRAP (args.This (), Base, w);
13551366
13561367 if (args.Length () < 1 || !Buffer::HasInstance (args[0 ]))
13571368 return ThrowTypeError (" Must give a Buffer as first argument" );
0 commit comments