diff options
author | cjihrig <cjihrig@gmail.com> | 2018-12-07 01:29:58 -0500 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-12-08 22:42:05 -0800 |
commit | 24e6b709eadd320ae39fd942261ac111446bb3c9 (patch) | |
tree | be4581f06e462c683f1ba28d86e73b2f9ee069ac /src/node_http2.cc | |
parent | 4dc10ac7d7ddd2cc52e84d1394f7e863d576109f (diff) | |
download | android-node-v8-24e6b709eadd320ae39fd942261ac111446bb3c9.tar.gz android-node-v8-24e6b709eadd320ae39fd942261ac111446bb3c9.tar.bz2 android-node-v8-24e6b709eadd320ae39fd942261ac111446bb3c9.zip |
src: use isolate version of BooleanValue()
This fixes deprecation warnings.
PR-URL: https://github.com/nodejs/node/pull/24883
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index 58ba052f04..1489d8b6f8 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -341,7 +341,7 @@ Http2Priority::Http2Priority(Environment* env, Local<Context> context = env->context(); int32_t parent_ = parent->Int32Value(context).ToChecked(); int32_t weight_ = weight->Int32Value(context).ToChecked(); - bool exclusive_ = exclusive->BooleanValue(context).ToChecked(); + bool exclusive_ = exclusive->BooleanValue(env->isolate()); Debug(env, DebugCategory::HTTP2STREAM, "Http2Priority: parent: %d, weight: %d, exclusive: %d\n", parent_, weight_, exclusive_); @@ -1096,7 +1096,7 @@ int Http2Session::OnStreamClose(nghttp2_session* handle, stream->MakeCallback(env->http2session_on_stream_close_function(), 1, &arg); if (answer.IsEmpty() || - !(answer.ToLocalChecked()->BooleanValue(env->context()).FromJust())) { + !(answer.ToLocalChecked()->BooleanValue(env->isolate()))) { // Skip to destroy stream->Destroy(); } @@ -2436,7 +2436,7 @@ void Http2Session::Destroy(const FunctionCallbackInfo<Value>& args) { Local<Context> context = env->context(); uint32_t code = args[0]->Uint32Value(context).ToChecked(); - bool socketDestroyed = args[1]->BooleanValue(context).ToChecked(); + bool socketDestroyed = args[1]->BooleanValue(env->isolate()); session->Close(code, socketDestroyed); } @@ -2647,12 +2647,11 @@ void Http2Stream::PushPromise(const FunctionCallbackInfo<Value>& args) { // Send a PRIORITY frame void Http2Stream::Priority(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); - Local<Context> context = env->context(); Http2Stream* stream; ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); Http2Priority priority(env, args[0], args[1], args[2]); - bool silent = args[3]->BooleanValue(context).ToChecked(); + bool silent = args[3]->BooleanValue(env->isolate()); CHECK_EQ(stream->SubmitPriority(*priority, silent), 0); Debug(stream, "priority submitted"); |