@@ -341,7 +341,7 @@ Http2Priority::Http2Priority(Environment* env,
341
341
Local<Context> context = env->context ();
342
342
int32_t parent_ = parent->Int32Value (context).ToChecked ();
343
343
int32_t weight_ = weight->Int32Value (context).ToChecked ();
344
- bool exclusive_ = exclusive->BooleanValue (context). ToChecked ( );
344
+ bool exclusive_ = exclusive->BooleanValue (env-> isolate () );
345
345
Debug (env, DebugCategory::HTTP2STREAM,
346
346
" Http2Priority: parent: %d, weight: %d, exclusive: %d\n " ,
347
347
parent_, weight_, exclusive_);
@@ -1096,7 +1096,7 @@ int Http2Session::OnStreamClose(nghttp2_session* handle,
1096
1096
stream->MakeCallback (env->http2session_on_stream_close_function (),
1097
1097
1 , &arg);
1098
1098
if (answer.IsEmpty () ||
1099
- !(answer.ToLocalChecked ()->BooleanValue (env->context ()). FromJust ( ))) {
1099
+ !(answer.ToLocalChecked ()->BooleanValue (env->isolate () ))) {
1100
1100
// Skip to destroy
1101
1101
stream->Destroy ();
1102
1102
}
@@ -2436,7 +2436,7 @@ void Http2Session::Destroy(const FunctionCallbackInfo<Value>& args) {
2436
2436
Local<Context> context = env->context ();
2437
2437
2438
2438
uint32_t code = args[0 ]->Uint32Value (context).ToChecked ();
2439
- bool socketDestroyed = args[1 ]->BooleanValue (context). ToChecked ( );
2439
+ bool socketDestroyed = args[1 ]->BooleanValue (env-> isolate () );
2440
2440
2441
2441
session->Close (code, socketDestroyed);
2442
2442
}
@@ -2647,12 +2647,11 @@ void Http2Stream::PushPromise(const FunctionCallbackInfo<Value>& args) {
2647
2647
// Send a PRIORITY frame
2648
2648
void Http2Stream::Priority (const FunctionCallbackInfo<Value>& args) {
2649
2649
Environment* env = Environment::GetCurrent (args);
2650
- Local<Context> context = env->context ();
2651
2650
Http2Stream* stream;
2652
2651
ASSIGN_OR_RETURN_UNWRAP (&stream, args.Holder ());
2653
2652
2654
2653
Http2Priority priority (env, args[0 ], args[1 ], args[2 ]);
2655
- bool silent = args[3 ]->BooleanValue (context). ToChecked ( );
2654
+ bool silent = args[3 ]->BooleanValue (env-> isolate () );
2656
2655
2657
2656
CHECK_EQ (stream->SubmitPriority (*priority, silent), 0 );
2658
2657
Debug (stream, " priority submitted" );
0 commit comments