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 @@ -2495,10 +2495,6 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
24952495 env->sni_context_string ()).ToLocalChecked ();
24962496 Local<FunctionTemplate> cons = env->secure_context_constructor_template ();
24972497
2498- // Not an object, probably undefined or null
2499- if (!ctx->IsObject ())
2500- goto fire_cb;
2501-
25022498 if (cons->HasInstance (ctx)) {
25032499 SecureContext* sc = Unwrap<SecureContext>(ctx.As <Object>());
25042500 CHECK_NOT_NULL (sc);
@@ -2511,14 +2507,13 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
25112507 unsigned long err = ERR_get_error (); // NOLINT(runtime/int)
25122508 return ThrowCryptoError (env, err, " CertCbDone" );
25132509 }
2514- } else {
2510+ } else if (ctx-> IsObject ()) {
25152511 // Failure: incorrect SNI context object
25162512 Local<Value> err = Exception::TypeError (env->sni_context_err_string ());
25172513 w->MakeCallback (env->onerror_string (), 1 , &err);
25182514 return ;
25192515 }
25202516
2521- fire_cb:
25222517 CertCb cb;
25232518 void * arg;
25242519
You can’t perform that action at this time.
0 commit comments