File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -2474,10 +2474,6 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
24742474 env->sni_context_string ()).ToLocalChecked ();
24752475 Local<FunctionTemplate> cons = env->secure_context_constructor_template ();
24762476
2477- // Not an object, probably undefined or null
2478- if (!ctx->IsObject ())
2479- goto fire_cb;
2480-
24812477 if (cons->HasInstance (ctx)) {
24822478 SecureContext* sc = Unwrap<SecureContext>(ctx.As <Object>());
24832479 CHECK_NOT_NULL (sc);
@@ -2490,14 +2486,13 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
24902486 unsigned long err = ERR_get_error (); // NOLINT(runtime/int)
24912487 return ThrowCryptoError (env, err, " CertCbDone" );
24922488 }
2493- } else {
2489+ } else if (ctx-> IsObject ()) {
24942490 // Failure: incorrect SNI context object
24952491 Local<Value> err = Exception::TypeError (env->sni_context_err_string ());
24962492 w->MakeCallback (env->onerror_string (), 1 , &err);
24972493 return ;
24982494 }
24992495
2500- fire_cb:
25012496 CertCb cb;
25022497 void * arg;
25032498
You can’t perform that action at this time.
0 commit comments