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 @@ -2495,10 +2495,6 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
2495
2495
env->sni_context_string ()).ToLocalChecked ();
2496
2496
Local<FunctionTemplate> cons = env->secure_context_constructor_template ();
2497
2497
2498
- // Not an object, probably undefined or null
2499
- if (!ctx->IsObject ())
2500
- goto fire_cb;
2501
-
2502
2498
if (cons->HasInstance (ctx)) {
2503
2499
SecureContext* sc = Unwrap<SecureContext>(ctx.As <Object>());
2504
2500
CHECK_NOT_NULL (sc);
@@ -2511,14 +2507,13 @@ void SSLWrap<Base>::CertCbDone(const FunctionCallbackInfo<Value>& args) {
2511
2507
unsigned long err = ERR_get_error (); // NOLINT(runtime/int)
2512
2508
return ThrowCryptoError (env, err, " CertCbDone" );
2513
2509
}
2514
- } else {
2510
+ } else if (ctx-> IsObject ()) {
2515
2511
// Failure: incorrect SNI context object
2516
2512
Local<Value> err = Exception::TypeError (env->sni_context_err_string ());
2517
2513
w->MakeCallback (env->onerror_string (), 1 , &err);
2518
2514
return ;
2519
2515
}
2520
2516
2521
- fire_cb:
2522
2517
CertCb cb;
2523
2518
void * arg;
2524
2519
You can’t perform that action at this time.
0 commit comments