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