@@ -347,11 +347,11 @@ Http2Priority::Http2Priority(Environment* env,
347
347
Local<Context> context = env->context ();
348
348
int32_t parent_ = parent->Int32Value (context).ToChecked ();
349
349
int32_t weight_ = weight->Int32Value (context).ToChecked ();
350
- bool exclusive_ = exclusive->BooleanValue (env-> isolate () );
350
+ bool exclusive_ = exclusive->IsTrue ( );
351
351
Debug (env, DebugCategory::HTTP2STREAM,
352
352
" Http2Priority: parent: %d, weight: %d, exclusive: %s\n " ,
353
353
parent_, weight_, exclusive_ ? " yes" : " no" );
354
- nghttp2_priority_spec_init (&spec , parent_, weight_, exclusive_ ? 1 : 0 );
354
+ nghttp2_priority_spec_init (this , parent_, weight_, exclusive_ ? 1 : 0 );
355
355
}
356
356
357
357
@@ -995,8 +995,7 @@ int Http2Session::OnStreamClose(nghttp2_session* handle,
995
995
MaybeLocal<Value> answer =
996
996
stream->MakeCallback (env->http2session_on_stream_close_function (),
997
997
1 , &arg);
998
- if (answer.IsEmpty () ||
999
- !(answer.ToLocalChecked ()->BooleanValue (env->isolate ()))) {
998
+ if (answer.IsEmpty () || answer.ToLocalChecked ()->IsFalse ()) {
1000
999
// Skip to destroy
1001
1000
stream->Destroy ();
1002
1001
}
@@ -2443,9 +2442,7 @@ void Http2Session::Destroy(const FunctionCallbackInfo<Value>& args) {
2443
2442
Local<Context> context = env->context ();
2444
2443
2445
2444
uint32_t code = args[0 ]->Uint32Value (context).ToChecked ();
2446
- bool socketDestroyed = args[1 ]->BooleanValue (env->isolate ());
2447
-
2448
- session->Close (code, socketDestroyed);
2445
+ session->Close (code, args[1 ]->IsTrue ());
2449
2446
}
2450
2447
2451
2448
// Submits a new request on the Http2Session and returns either an error code
@@ -2464,7 +2461,7 @@ void Http2Session::Request(const FunctionCallbackInfo<Value>& args) {
2464
2461
int32_t ret = 0 ;
2465
2462
Http2Stream* stream =
2466
2463
session->Http2Session ::SubmitRequest (
2467
- * priority,
2464
+ & priority,
2468
2465
Http2Headers (env, headers),
2469
2466
&ret,
2470
2467
static_cast <int >(options));
@@ -2637,9 +2634,9 @@ void Http2Stream::Priority(const FunctionCallbackInfo<Value>& args) {
2637
2634
ASSIGN_OR_RETURN_UNWRAP (&stream, args.Holder ());
2638
2635
2639
2636
Http2Priority priority (env, args[0 ], args[1 ], args[2 ]);
2640
- bool silent = args[3 ]->BooleanValue (env-> isolate () );
2637
+ bool silent = args[3 ]->IsTrue ( );
2641
2638
2642
- CHECK_EQ (stream->SubmitPriority (* priority, silent), 0 );
2639
+ CHECK_EQ (stream->SubmitPriority (& priority, silent), 0 );
2643
2640
Debug (stream, " priority submitted" );
2644
2641
}
2645
2642
0 commit comments