@@ -347,11 +347,11 @@ Http2Priority::Http2Priority(Environment* env,
347347 Local<Context> context = env->context ();
348348 int32_t parent_ = parent->Int32Value (context).ToChecked ();
349349 int32_t weight_ = weight->Int32Value (context).ToChecked ();
350- bool exclusive_ = exclusive->BooleanValue (env-> isolate () );
350+ bool exclusive_ = exclusive->IsTrue ( );
351351 Debug (env, DebugCategory::HTTP2STREAM,
352352 " Http2Priority: parent: %d, weight: %d, exclusive: %s\n " ,
353353 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 );
355355}
356356
357357
@@ -995,8 +995,7 @@ int Http2Session::OnStreamClose(nghttp2_session* handle,
995995 MaybeLocal<Value> answer =
996996 stream->MakeCallback (env->http2session_on_stream_close_function (),
997997 1 , &arg);
998- if (answer.IsEmpty () ||
999- !(answer.ToLocalChecked ()->BooleanValue (env->isolate ()))) {
998+ if (answer.IsEmpty () || answer.ToLocalChecked ()->IsFalse ()) {
1000999 // Skip to destroy
10011000 stream->Destroy ();
10021001 }
@@ -2443,9 +2442,7 @@ void Http2Session::Destroy(const FunctionCallbackInfo<Value>& args) {
24432442 Local<Context> context = env->context ();
24442443
24452444 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 ());
24492446}
24502447
24512448// Submits a new request on the Http2Session and returns either an error code
@@ -2464,7 +2461,7 @@ void Http2Session::Request(const FunctionCallbackInfo<Value>& args) {
24642461 int32_t ret = 0 ;
24652462 Http2Stream* stream =
24662463 session->Http2Session ::SubmitRequest (
2467- * priority,
2464+ & priority,
24682465 Http2Headers (env, headers),
24692466 &ret,
24702467 static_cast <int >(options));
@@ -2637,9 +2634,9 @@ void Http2Stream::Priority(const FunctionCallbackInfo<Value>& args) {
26372634 ASSIGN_OR_RETURN_UNWRAP (&stream, args.Holder ());
26382635
26392636 Http2Priority priority (env, args[0 ], args[1 ], args[2 ]);
2640- bool silent = args[3 ]->BooleanValue (env-> isolate () );
2637+ bool silent = args[3 ]->IsTrue ( );
26412638
2642- CHECK_EQ (stream->SubmitPriority (* priority, silent), 0 );
2639+ CHECK_EQ (stream->SubmitPriority (& priority, silent), 0 );
26432640 Debug (stream, " priority submitted" );
26442641}
26452642
0 commit comments