summaryrefslogtreecommitdiff
path: root/src/node_crypto.cc
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-12-07 01:29:58 -0500
committerRich Trott <rtrott@gmail.com>2018-12-08 22:42:05 -0800
commit24e6b709eadd320ae39fd942261ac111446bb3c9 (patch)
treebe4581f06e462c683f1ba28d86e73b2f9ee069ac /src/node_crypto.cc
parent4dc10ac7d7ddd2cc52e84d1394f7e863d576109f (diff)
downloadnode-new-24e6b709eadd320ae39fd942261ac111446bb3c9.tar.gz
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_crypto.cc')
-rw-r--r--src/node_crypto.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 222f4089d8..16d958ea88 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5751,8 +5751,8 @@ void SetFipsCrypto(const FunctionCallbackInfo<Value>& args) {
CHECK(!per_process_opts->force_fips_crypto);
Environment* env = Environment::GetCurrent(args);
const bool enabled = FIPS_mode();
- bool enable;
- if (!args[0]->BooleanValue(env->context()).To(&enable)) return;
+ bool enable = args[0]->BooleanValue(env->isolate());
+
if (enable == enabled)
return; // No action needed.
if (!FIPS_mode_set(enable)) {