File tree 1 file changed +1
-6
lines changed
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) {
2474
2474
env->sni_context_string ()).ToLocalChecked ();
2475
2475
Local<FunctionTemplate> cons = env->secure_context_constructor_template ();
2476
2476
2477
- // Not an object, probably undefined or null
2478
- if (!ctx->IsObject ())
2479
- goto fire_cb;
2480
-
2481
2477
if (cons->HasInstance (ctx)) {
2482
2478
SecureContext* sc = Unwrap<SecureContext>(ctx.As <Object>());
2483
2479
CHECK_NOT_NULL (sc);
@@ -2490,14 +2486,13 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
2490
2486
unsigned long err = ERR_get_error (); // NOLINT(runtime/int)
2491
2487
return ThrowCryptoError (env, err, " CertCbDone" );
2492
2488
}
2493
- } else {
2489
+ } else if (ctx-> IsObject ()) {
2494
2490
// Failure: incorrect SNI context object
2495
2491
Local<Value> err = Exception::TypeError (env->sni_context_err_string ());
2496
2492
w->MakeCallback (env->onerror_string (), 1 , &err);
2497
2493
return ;
2498
2494
}
2499
2495
2500
- fire_cb:
2501
2496
CertCb cb;
2502
2497
void * arg;
2503
2498
You can’t perform that action at this time.
0 commit comments