diff options
author | cjihrig <cjihrig@gmail.com> | 2018-12-07 09:29:58 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-12-09 09:42:05 +0300 |
commit | 24e6b709eadd320ae39fd942261ac111446bb3c9 (patch) | |
tree | be4581f06e462c683f1ba28d86e73b2f9ee069ac /src/node_serdes.cc | |
parent | 4dc10ac7d7ddd2cc52e84d1394f7e863d576109f (diff) |
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_serdes.cc')
-rw-r--r-- | src/node_serdes.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node_serdes.cc b/src/node_serdes.cc index 565fb7e3f08..27b4e9e8b49 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -192,9 +192,8 @@ void SerializerContext::SetTreatArrayBufferViewsAsHostObjects( SerializerContext* ctx; ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder()); - Maybe<bool> value = args[0]->BooleanValue(ctx->env()->context()); - if (value.IsNothing()) return; - ctx->serializer_.SetTreatArrayBufferViewsAsHostObjects(value.FromJust()); + bool value = args[0]->BooleanValue(ctx->env()->isolate()); + ctx->serializer_.SetTreatArrayBufferViewsAsHostObjects(value); } void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) { |